Browse Source

Compile and link core tests with libuv

murgatroid99 9 years ago
parent
commit
c36f6ea745
54 changed files with 780 additions and 66 deletions
  1. 6 0
      BUILD
  2. 5 0
      CMakeLists.txt
  3. 20 4
      Makefile
  4. 1 0
      binding.gyp
  5. 17 0
      build.yaml
  6. 1 0
      config.m4
  7. 1 0
      gRPC-Core.podspec
  8. 1 0
      grpc.gemspec
  9. 1 0
      package.xml
  10. 1 1
      src/boringssl/gen_build_yaml.py
  11. 50 0
      src/core/lib/iomgr/endpoint_pair_uv.c
  12. 2 1
      src/core/lib/iomgr/sockaddr.h
  13. 0 1
      src/core/lib/iomgr/tcp_client.h
  14. 20 5
      src/core/lib/iomgr/tcp_client_uv.c
  15. 4 4
      src/core/lib/iomgr/tcp_uv.c
  16. 1 0
      src/python/grpcio/grpc_core_dependencies.py
  17. 5 4
      templates/Makefile.template
  18. 1 0
      templates/tools/run_tests/tests.json.template
  19. 2 1
      test/core/client_config/set_initial_connect_string_test.c
  20. 2 1
      test/core/end2end/bad_server_response_test.c
  21. 12 34
      test/core/end2end/cq_verifier.c
  22. 47 0
      test/core/end2end/cq_verifier_internal.h
  23. 73 0
      test/core/end2end/cq_verifier_native.c
  24. 108 0
      test/core/end2end/cq_verifier_uv.c
  25. 13 0
      test/core/end2end/dualstack_socket_test.c
  26. 13 0
      test/core/end2end/fixtures/h2_fd.c
  27. 13 0
      test/core/end2end/fixtures/h2_full+pipe.c
  28. 2 0
      test/core/end2end/fixtures/http_proxy.c
  29. 3 3
      test/core/end2end/fuzzers/api_fuzzer.c
  30. 4 4
      test/core/end2end/gen_build_yaml.py
  31. 13 0
      test/core/iomgr/fd_posix_test.c
  32. 13 1
      test/core/iomgr/socket_utils_test.c
  33. 13 0
      test/core/iomgr/tcp_posix_test.c
  34. 13 0
      test/core/iomgr/tcp_server_posix_test.c
  35. 13 0
      test/core/iomgr/timer_heap_test.c
  36. 1 1
      test/core/util/port_server_client.c
  37. 58 0
      test/core/util/port_uv.c
  38. 1 0
      tools/doxygen/Doxyfile.c++.internal
  39. 1 0
      tools/doxygen/Doxyfile.core.internal
  40. 20 1
      tools/run_tests/run_tests.py
  41. 6 0
      tools/run_tests/sources_and_headers.json
  42. 136 0
      tools/run_tests/tests.json
  43. 2 0
      vsprojects/vcxproj/grpc++/grpc++.vcxproj
  44. 3 0
      vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
  45. 2 0
      vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
  46. 3 0
      vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
  47. 2 0
      vsprojects/vcxproj/grpc/grpc.vcxproj
  48. 3 0
      vsprojects/vcxproj/grpc/grpc.vcxproj.filters
  49. 9 0
      vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
  50. 15 0
      vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
  51. 7 0
      vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj
  52. 12 0
      vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters
  53. 2 0
      vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
  54. 3 0
      vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters

+ 6 - 0
BUILD

@@ -348,6 +348,7 @@ cc_library(
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
+    "src/core/lib/iomgr/endpoint_pair_uv.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
@@ -749,6 +750,7 @@ cc_library(
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
+    "src/core/lib/iomgr/endpoint_pair_uv.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
@@ -1112,6 +1114,7 @@ cc_library(
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
+    "src/core/lib/iomgr/endpoint_pair_uv.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
@@ -1459,6 +1462,7 @@ cc_library(
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
+    "src/core/lib/iomgr/endpoint_pair_uv.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
@@ -1880,6 +1884,7 @@ cc_library(
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
+    "src/core/lib/iomgr/endpoint_pair_uv.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
@@ -2279,6 +2284,7 @@ objc_library(
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/combiner.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
     "src/core/lib/iomgr/endpoint_pair_posix.c",
+    "src/core/lib/iomgr/endpoint_pair_uv.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/endpoint_pair_windows.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/error.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",
     "src/core/lib/iomgr/ev_epoll_linux.c",

+ 5 - 0
CMakeLists.txt

@@ -309,6 +309,7 @@ add_library(grpc
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint_pair_posix.c
   src/core/lib/iomgr/endpoint_pair_posix.c
+  src/core/lib/iomgr/endpoint_pair_uv.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/ev_epoll_linux.c
   src/core/lib/iomgr/ev_epoll_linux.c
@@ -577,6 +578,7 @@ add_library(grpc_cronet
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint_pair_posix.c
   src/core/lib/iomgr/endpoint_pair_posix.c
+  src/core/lib/iomgr/endpoint_pair_uv.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/ev_epoll_linux.c
   src/core/lib/iomgr/ev_epoll_linux.c
@@ -817,6 +819,7 @@ add_library(grpc_unsecure
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint_pair_posix.c
   src/core/lib/iomgr/endpoint_pair_posix.c
+  src/core/lib/iomgr/endpoint_pair_uv.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/ev_epoll_linux.c
   src/core/lib/iomgr/ev_epoll_linux.c
@@ -1085,6 +1088,7 @@ add_library(grpc++
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint_pair_posix.c
   src/core/lib/iomgr/endpoint_pair_posix.c
+  src/core/lib/iomgr/endpoint_pair_uv.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/ev_epoll_linux.c
   src/core/lib/iomgr/ev_epoll_linux.c
@@ -1449,6 +1453,7 @@ add_library(grpc++_unsecure
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/combiner.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint.c
   src/core/lib/iomgr/endpoint_pair_posix.c
   src/core/lib/iomgr/endpoint_pair_posix.c
+  src/core/lib/iomgr/endpoint_pair_uv.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/endpoint_pair_windows.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/error.c
   src/core/lib/iomgr/ev_epoll_linux.c
   src/core/lib/iomgr/ev_epoll_linux.c

+ 20 - 4
Makefile

@@ -345,10 +345,6 @@ HOST_CXX ?= $(CXX)
 HOST_LD ?= $(LD)
 HOST_LD ?= $(LD)
 HOST_LDXX ?= $(LDXX)
 HOST_LDXX ?= $(LDXX)
 
 
-ifdef EXTRA_DEFINES
-DEFINES += $(EXTRA_DEFINES)
-endif
-
 CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) $(W_EXTRA_SEMI)
 CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) $(W_EXTRA_SEMI)
 ifeq ($(HAS_CXX11),true)
 ifeq ($(HAS_CXX11),true)
 CXXFLAGS += -std=c++11
 CXXFLAGS += -std=c++11
@@ -447,6 +443,14 @@ LDFLAGS += $(ARCH_FLAGS)
 LDLIBS += $(addprefix -l, $(LIBS))
 LDLIBS += $(addprefix -l, $(LIBS))
 LDLIBSXX += $(addprefix -l, $(LIBSXX))
 LDLIBSXX += $(addprefix -l, $(LIBSXX))
 
 
+
+CFLAGS += $(EXTRA_CFLAGS)
+CXXFLAGS += $(EXTRA_CXXFLAGS)
+CPPFLAGS += $(EXTRA_CPPFLAGS)
+LDFLAGS += $(EXTRA_LDFLAGS)
+DEFINES += $(EXTRA_DEFINES)
+LDLIBS += $(EXTRA_LDLIBS)
+
 HOST_CPPFLAGS = $(CPPFLAGS)
 HOST_CPPFLAGS = $(CPPFLAGS)
 HOST_CFLAGS = $(CFLAGS)
 HOST_CFLAGS = $(CFLAGS)
 HOST_CXXFLAGS = $(CXXFLAGS)
 HOST_CXXFLAGS = $(CXXFLAGS)
@@ -2546,6 +2550,7 @@ LIBGRPC_SRC = \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
@@ -2832,6 +2837,7 @@ LIBGRPC_CRONET_SRC = \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
@@ -3076,6 +3082,8 @@ LIBGRPC_TEST_UTIL_SRC = \
     test/core/end2end/data/test_root_cert.c \
     test/core/end2end/data/test_root_cert.c \
     test/core/security/oauth2_utils.c \
     test/core/security/oauth2_utils.c \
     test/core/end2end/cq_verifier.c \
     test/core/end2end/cq_verifier.c \
+    test/core/end2end/cq_verifier_native.c \
+    test/core/end2end/cq_verifier_uv.c \
     test/core/end2end/fixtures/http_proxy.c \
     test/core/end2end/fixtures/http_proxy.c \
     test/core/end2end/fixtures/proxy.c \
     test/core/end2end/fixtures/proxy.c \
     test/core/iomgr/endpoint_tests.c \
     test/core/iomgr/endpoint_tests.c \
@@ -3086,6 +3094,7 @@ LIBGRPC_TEST_UTIL_SRC = \
     test/core/util/passthru_endpoint.c \
     test/core/util/passthru_endpoint.c \
     test/core/util/port_posix.c \
     test/core/util/port_posix.c \
     test/core/util/port_server_client.c \
     test/core/util/port_server_client.c \
+    test/core/util/port_uv.c \
     test/core/util/port_windows.c \
     test/core/util/port_windows.c \
     test/core/util/slice_splitter.c \
     test/core/util/slice_splitter.c \
     src/core/lib/channel/channel_args.c \
     src/core/lib/channel/channel_args.c \
@@ -3107,6 +3116,7 @@ LIBGRPC_TEST_UTIL_SRC = \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
@@ -3253,6 +3263,8 @@ endif
 
 
 LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
 LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
     test/core/end2end/cq_verifier.c \
     test/core/end2end/cq_verifier.c \
+    test/core/end2end/cq_verifier_native.c \
+    test/core/end2end/cq_verifier_uv.c \
     test/core/end2end/fixtures/http_proxy.c \
     test/core/end2end/fixtures/http_proxy.c \
     test/core/end2end/fixtures/proxy.c \
     test/core/end2end/fixtures/proxy.c \
     test/core/iomgr/endpoint_tests.c \
     test/core/iomgr/endpoint_tests.c \
@@ -3263,6 +3275,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
     test/core/util/passthru_endpoint.c \
     test/core/util/passthru_endpoint.c \
     test/core/util/port_posix.c \
     test/core/util/port_posix.c \
     test/core/util/port_server_client.c \
     test/core/util/port_server_client.c \
+    test/core/util/port_uv.c \
     test/core/util/port_windows.c \
     test/core/util/port_windows.c \
     test/core/util/slice_splitter.c \
     test/core/util/slice_splitter.c \
 
 
@@ -3310,6 +3323,7 @@ LIBGRPC_UNSECURE_SRC = \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
@@ -3661,6 +3675,7 @@ LIBGRPC++_SRC = \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
@@ -4300,6 +4315,7 @@ LIBGRPC++_UNSECURE_SRC = \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \

+ 1 - 0
binding.gyp

@@ -587,6 +587,7 @@
         'src/core/lib/iomgr/combiner.c',
         'src/core/lib/iomgr/combiner.c',
         'src/core/lib/iomgr/endpoint.c',
         'src/core/lib/iomgr/endpoint.c',
         'src/core/lib/iomgr/endpoint_pair_posix.c',
         'src/core/lib/iomgr/endpoint_pair_posix.c',
+        'src/core/lib/iomgr/endpoint_pair_uv.c',
         'src/core/lib/iomgr/endpoint_pair_windows.c',
         'src/core/lib/iomgr/endpoint_pair_windows.c',
         'src/core/lib/iomgr/error.c',
         'src/core/lib/iomgr/error.c',
         'src/core/lib/iomgr/ev_epoll_linux.c',
         'src/core/lib/iomgr/ev_epoll_linux.c',

+ 17 - 0
build.yaml

@@ -275,6 +275,7 @@ filegroups:
   - src/core/lib/iomgr/combiner.c
   - src/core/lib/iomgr/combiner.c
   - src/core/lib/iomgr/endpoint.c
   - src/core/lib/iomgr/endpoint.c
   - src/core/lib/iomgr/endpoint_pair_posix.c
   - src/core/lib/iomgr/endpoint_pair_posix.c
+  - src/core/lib/iomgr/endpoint_pair_uv.c
   - src/core/lib/iomgr/endpoint_pair_windows.c
   - src/core/lib/iomgr/endpoint_pair_windows.c
   - src/core/lib/iomgr/error.c
   - src/core/lib/iomgr/error.c
   - src/core/lib/iomgr/ev_epoll_linux.c
   - src/core/lib/iomgr/ev_epoll_linux.c
@@ -522,6 +523,7 @@ filegroups:
   build: test
   build: test
   headers:
   headers:
   - test/core/end2end/cq_verifier.h
   - test/core/end2end/cq_verifier.h
+  - test/core/end2end/cq_verifier_internal.h
   - test/core/end2end/fixtures/http_proxy.h
   - test/core/end2end/fixtures/http_proxy.h
   - test/core/end2end/fixtures/proxy.h
   - test/core/end2end/fixtures/proxy.h
   - test/core/iomgr/endpoint_tests.h
   - test/core/iomgr/endpoint_tests.h
@@ -535,6 +537,8 @@ filegroups:
   - test/core/util/slice_splitter.h
   - test/core/util/slice_splitter.h
   src:
   src:
   - test/core/end2end/cq_verifier.c
   - test/core/end2end/cq_verifier.c
+  - test/core/end2end/cq_verifier_native.c
+  - test/core/end2end/cq_verifier_uv.c
   - test/core/end2end/fixtures/http_proxy.c
   - test/core/end2end/fixtures/http_proxy.c
   - test/core/end2end/fixtures/proxy.c
   - test/core/end2end/fixtures/proxy.c
   - test/core/iomgr/endpoint_tests.c
   - test/core/iomgr/endpoint_tests.c
@@ -545,6 +549,7 @@ filegroups:
   - test/core/util/passthru_endpoint.c
   - test/core/util/passthru_endpoint.c
   - test/core/util/port_posix.c
   - test/core/util/port_posix.c
   - test/core/util/port_server_client.c
   - test/core/util/port_server_client.c
+  - test/core/util/port_uv.c
   - test/core/util/port_windows.c
   - test/core/util/port_windows.c
   - test/core/util/slice_splitter.c
   - test/core/util/slice_splitter.c
   deps:
   deps:
@@ -1511,6 +1516,8 @@ targets:
   - grpc
   - grpc
   - gpr_test_util
   - gpr_test_util
   - gpr
   - gpr
+  exclude_iomgrs:
+  - uv
   platforms:
   platforms:
   - mac
   - mac
   - linux
   - linux
@@ -2451,6 +2458,8 @@ targets:
   - grpc
   - grpc
   - gpr_test_util
   - gpr_test_util
   - gpr
   - gpr
+  exclude_iomgrs:
+  - uv
   platforms:
   platforms:
   - mac
   - mac
   - linux
   - linux
@@ -2466,6 +2475,8 @@ targets:
   - grpc
   - grpc
   - gpr_test_util
   - gpr_test_util
   - gpr
   - gpr
+  exclude_iomgrs:
+  - uv
   platforms:
   platforms:
   - mac
   - mac
   - linux
   - linux
@@ -2480,6 +2491,8 @@ targets:
   - grpc
   - grpc
   - gpr_test_util
   - gpr_test_util
   - gpr
   - gpr
+  exclude_iomgrs:
+  - uv
   platforms:
   platforms:
   - mac
   - mac
   - linux
   - linux
@@ -2514,6 +2527,8 @@ targets:
   - grpc
   - grpc
   - gpr_test_util
   - gpr_test_util
   - gpr
   - gpr
+  exclude_iomgrs:
+  - uv
 - name: timer_list_test
 - name: timer_list_test
   build: test
   build: test
   language: c
   language: c
@@ -2524,6 +2539,8 @@ targets:
   - grpc
   - grpc
   - gpr_test_util
   - gpr_test_util
   - gpr
   - gpr
+  exclude_iomgrs:
+  - uv
 - name: transport_connectivity_state_test
 - name: transport_connectivity_state_test
   build: test
   build: test
   language: c
   language: c

+ 1 - 0
config.m4

@@ -103,6 +103,7 @@ if test "$PHP_GRPC" != "no"; then
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/combiner.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
     src/core/lib/iomgr/endpoint_pair_posix.c \
+    src/core/lib/iomgr/endpoint_pair_uv.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/endpoint_pair_windows.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/error.c \
     src/core/lib/iomgr/ev_epoll_linux.c \
     src/core/lib/iomgr/ev_epoll_linux.c \

+ 1 - 0
gRPC-Core.podspec

@@ -439,6 +439,7 @@ Pod::Spec.new do |s|
                       'src/core/lib/iomgr/combiner.c',
                       'src/core/lib/iomgr/combiner.c',
                       'src/core/lib/iomgr/endpoint.c',
                       'src/core/lib/iomgr/endpoint.c',
                       'src/core/lib/iomgr/endpoint_pair_posix.c',
                       'src/core/lib/iomgr/endpoint_pair_posix.c',
+                      'src/core/lib/iomgr/endpoint_pair_uv.c',
                       'src/core/lib/iomgr/endpoint_pair_windows.c',
                       'src/core/lib/iomgr/endpoint_pair_windows.c',
                       'src/core/lib/iomgr/error.c',
                       'src/core/lib/iomgr/error.c',
                       'src/core/lib/iomgr/ev_epoll_linux.c',
                       'src/core/lib/iomgr/ev_epoll_linux.c',

+ 1 - 0
grpc.gemspec

@@ -359,6 +359,7 @@ Gem::Specification.new do |s|
   s.files += %w( src/core/lib/iomgr/combiner.c )
   s.files += %w( src/core/lib/iomgr/combiner.c )
   s.files += %w( src/core/lib/iomgr/endpoint.c )
   s.files += %w( src/core/lib/iomgr/endpoint.c )
   s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c )
   s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c )
+  s.files += %w( src/core/lib/iomgr/endpoint_pair_uv.c )
   s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c )
   s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c )
   s.files += %w( src/core/lib/iomgr/error.c )
   s.files += %w( src/core/lib/iomgr/error.c )
   s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c )
   s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c )

+ 1 - 0
package.xml

@@ -366,6 +366,7 @@
     <file baseinstalldir="/" name="src/core/lib/iomgr/combiner.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/combiner.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" />
+    <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_uv.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/error.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/error.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.c" role="src" />
     <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.c" role="src" />

+ 1 - 1
src/boringssl/gen_build_yaml.py

@@ -36,7 +36,7 @@ import yaml
 sys.dont_write_bytecode = True
 sys.dont_write_bytecode = True
 
 
 boring_ssl_root = os.path.abspath(os.path.join(
 boring_ssl_root = os.path.abspath(os.path.join(
-    os.path.dirname(sys.argv[0]), 
+    os.path.dirname(sys.argv[0]),
     '../../third_party/boringssl'))
     '../../third_party/boringssl'))
 sys.path.append(os.path.join(boring_ssl_root, 'util'))
 sys.path.append(os.path.join(boring_ssl_root, 'util'))
 
 

+ 50 - 0
src/core/lib/iomgr/endpoint_pair_uv.c

@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright 2016, 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.
+ *
+ */
+
+#include "src/core/lib/iomgr/port.h"
+
+#ifdef GRPC_UV
+
+#include <stdlib.h>
+
+#include "src/core/lib/iomgr/endpoint_pair.h"
+
+grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name,
+                                                   size_t read_slice_size) {
+  grpc_endpoint_pair endpoint_pair;
+  // TODO(mlumish): implement this properly under libuv
+  abort();
+  return endpoint_pair;
+}
+
+#endif /* GRPC_UV */

+ 2 - 1
src/core/lib/iomgr/sockaddr.h

@@ -32,7 +32,8 @@
  */
  */
 
 
 /* This header transitively includes other headers that care about include
 /* This header transitively includes other headers that care about include
- * order, so it should be included first */
+ * order, so it should be included first. As a consequence, it should not be
+ * included in any other header. */
 
 
 #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H
 #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H
 #define GRPC_CORE_LIB_IOMGR_SOCKADDR_H
 #define GRPC_CORE_LIB_IOMGR_SOCKADDR_H

+ 0 - 1
src/core/lib/iomgr/tcp_client.h

@@ -38,7 +38,6 @@
 #include "src/core/lib/iomgr/endpoint.h"
 #include "src/core/lib/iomgr/endpoint.h"
 #include "src/core/lib/iomgr/pollset_set.h"
 #include "src/core/lib/iomgr/pollset_set.h"
 #include "src/core/lib/iomgr/resolve_address.h"
 #include "src/core/lib/iomgr/resolve_address.h"
-#include "src/core/lib/iomgr/sockaddr.h"
 
 
 /* Asynchronously connect to an address (specified as (addr, len)), and call
 /* Asynchronously connect to an address (specified as (addr, len)), and call
    cb with arg and the completed connection when done (or call cb with arg and
    cb with arg and the completed connection when done (or call cb with arg and

+ 20 - 5
src/core/lib/iomgr/tcp_client_uv.c

@@ -116,11 +116,11 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) {
   grpc_exec_ctx_finish(&exec_ctx);
   grpc_exec_ctx_finish(&exec_ctx);
 }
 }
 
 
-void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
-                             grpc_endpoint **ep,
-                             grpc_pollset_set *interested_parties,
-                             const grpc_resolved_address *resolved_addr,
-                             gpr_timespec deadline) {
+static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
+                                    grpc_closure *closure, grpc_endpoint **ep,
+                                    grpc_pollset_set *interested_parties,
+                                    const grpc_resolved_address *resolved_addr,
+                                    gpr_timespec deadline) {
   grpc_uv_tcp_connect *connect;
   grpc_uv_tcp_connect *connect;
   (void)interested_parties;
   (void)interested_parties;
   connect = gpr_malloc(sizeof(grpc_uv_tcp_connect));
   connect = gpr_malloc(sizeof(grpc_uv_tcp_connect));
@@ -141,4 +141,19 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
                   uv_tc_on_alarm, connect, gpr_now(GPR_CLOCK_MONOTONIC));
                   uv_tc_on_alarm, connect, gpr_now(GPR_CLOCK_MONOTONIC));
 }
 }
 
 
+// overridden by api_fuzzer.c
+void (*grpc_tcp_client_connect_impl)(
+    grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
+    grpc_pollset_set *interested_parties, const grpc_resolved_address *addr,
+    gpr_timespec deadline) = tcp_client_connect_impl;
+
+void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
+                             grpc_endpoint **ep,
+                             grpc_pollset_set *interested_parties,
+                             const grpc_resolved_address *addr,
+                             gpr_timespec deadline) {
+  grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr,
+                               deadline);
+}
+
 #endif /* GRPC_UV */
 #endif /* GRPC_UV */

+ 4 - 4
src/core/lib/iomgr/tcp_uv.c

@@ -135,7 +135,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread,
     error = GRPC_ERROR_CREATE("EOF");
     error = GRPC_ERROR_CREATE("EOF");
   } else if (nread > 0) {
   } else if (nread > 0) {
     // Successful read
     // Successful read
-    sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, nread);
+    sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, (size_t)nread);
     gpr_slice_buffer_add(tcp->read_slices, sub);
     gpr_slice_buffer_add(tcp->read_slices, sub);
     error = GRPC_ERROR_NONE;
     error = GRPC_ERROR_NONE;
     if (grpc_tcp_trace) {
     if (grpc_tcp_trace) {
@@ -217,10 +217,10 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
   uv_write_t *write_req;
   uv_write_t *write_req;
 
 
   if (grpc_tcp_trace) {
   if (grpc_tcp_trace) {
-    size_t i;
+    size_t j;
 
 
-    for (i = 0; i < write_slices->count; i++) {
-      char *data = gpr_dump_slice(write_slices->slices[i],
+    for (j = 0; j < write_slices->count; j++) {
+      char *data = gpr_dump_slice(write_slices->slices[j],
                                   GPR_DUMP_HEX | GPR_DUMP_ASCII);
                                   GPR_DUMP_HEX | GPR_DUMP_ASCII);
       gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data);
       gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data);
       gpr_free(data);
       gpr_free(data);

+ 1 - 0
src/python/grpcio/grpc_core_dependencies.py

@@ -97,6 +97,7 @@ CORE_SOURCE_FILES = [
   'src/core/lib/iomgr/combiner.c',
   'src/core/lib/iomgr/combiner.c',
   'src/core/lib/iomgr/endpoint.c',
   'src/core/lib/iomgr/endpoint.c',
   'src/core/lib/iomgr/endpoint_pair_posix.c',
   'src/core/lib/iomgr/endpoint_pair_posix.c',
+  'src/core/lib/iomgr/endpoint_pair_uv.c',
   'src/core/lib/iomgr/endpoint_pair_windows.c',
   'src/core/lib/iomgr/endpoint_pair_windows.c',
   'src/core/lib/iomgr/error.c',
   'src/core/lib/iomgr/error.c',
   'src/core/lib/iomgr/ev_epoll_linux.c',
   'src/core/lib/iomgr/ev_epoll_linux.c',

+ 5 - 4
templates/Makefile.template

@@ -219,10 +219,6 @@
   HOST_LD ?= $(LD)
   HOST_LD ?= $(LD)
   HOST_LDXX ?= $(LDXX)
   HOST_LDXX ?= $(LDXX)
 
 
-  ifdef EXTRA_DEFINES
-  DEFINES += $(EXTRA_DEFINES)
-  endif
-
   CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)}
   CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)}
   ifeq ($(HAS_CXX11),true)
   ifeq ($(HAS_CXX11),true)
   CXXFLAGS += -std=c++11
   CXXFLAGS += -std=c++11
@@ -324,6 +320,11 @@
   LDLIBS += $(addprefix -l, $(LIBS))
   LDLIBS += $(addprefix -l, $(LIBS))
   LDLIBSXX += $(addprefix -l, $(LIBSXX))
   LDLIBSXX += $(addprefix -l, $(LIBSXX))
 
 
+
+  % for arg in ['CFLAGS', 'CXXFLAGS', 'CPPFLAGS', 'LDFLAGS', 'DEFINES', 'LDLIBS']:
+  ${arg} += $(EXTRA_${arg})
+  % endfor
+
   HOST_CPPFLAGS = $(CPPFLAGS)
   HOST_CPPFLAGS = $(CPPFLAGS)
   HOST_CFLAGS = $(CFLAGS)
   HOST_CFLAGS = $(CFLAGS)
   HOST_CXXFLAGS = $(CXXFLAGS)
   HOST_CXXFLAGS = $(CXXFLAGS)

+ 1 - 0
templates/tools/run_tests/tests.json.template

@@ -10,6 +10,7 @@
                  "ci_platforms": tgt.ci_platforms,
                  "ci_platforms": tgt.ci_platforms,
                  "gtest": tgt.gtest,
                  "gtest": tgt.gtest,
                  "exclude_configs": tgt.get("exclude_configs", []),
                  "exclude_configs": tgt.get("exclude_configs", []),
+                 "exclude_iomgrs": tgt.get("exclude_iomgrs", []),
                  "args": [],
                  "args": [],
                  "flaky": tgt.flaky,
                  "flaky": tgt.flaky,
                  "cpu_cost": tgt.get("cpu_cost", 1.0)}
                  "cpu_cost": tgt.get("cpu_cost", 1.0)}

+ 2 - 1
test/core/client_config/set_initial_connect_string_test.c

@@ -30,6 +30,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *
  */
  */
+#include "src/core/lib/iomgr/sockaddr.h"
+
 #include <string.h>
 #include <string.h>
 
 
 #include <grpc/grpc.h>
 #include <grpc/grpc.h>
@@ -40,7 +42,6 @@
 #include <grpc/support/thd.h>
 #include <grpc/support/thd.h>
 
 
 #include "src/core/ext/client_config/initial_connect_string.h"
 #include "src/core/ext/client_config/initial_connect_string.h"
-#include "src/core/lib/iomgr/sockaddr.h"
 #include "src/core/lib/security/credentials/fake/fake_credentials.h"
 #include "src/core/lib/security/credentials/fake/fake_credentials.h"
 #include "src/core/lib/support/string.h"
 #include "src/core/lib/support/string.h"
 #include "test/core/util/port.h"
 #include "test/core/util/port.h"

+ 2 - 1
test/core/end2end/bad_server_response_test.c

@@ -30,6 +30,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *
  */
  */
+#include "src/core/lib/iomgr/sockaddr.h"
+
 #include <string.h>
 #include <string.h>
 
 
 #include <grpc/grpc.h>
 #include <grpc/grpc.h>
@@ -40,7 +42,6 @@
 #include <grpc/support/thd.h>
 #include <grpc/support/thd.h>
 
 
 // #include "src/core/ext/transport/chttp2/transport/internal.h"
 // #include "src/core/ext/transport/chttp2/transport/internal.h"
-#include "src/core/lib/iomgr/sockaddr.h"
 #include "src/core/lib/support/string.h"
 #include "src/core/lib/support/string.h"
 #include "test/core/end2end/cq_verifier.h"
 #include "test/core/end2end/cq_verifier.h"
 #include "test/core/util/port.h"
 #include "test/core/util/port.h"

+ 12 - 34
test/core/end2end/cq_verifier.c

@@ -32,6 +32,7 @@
  */
  */
 
 
 #include "test/core/end2end/cq_verifier.h"
 #include "test/core/end2end/cq_verifier.h"
+#include "test/core/end2end/cq_verifier_internal.h"
 
 
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdio.h>
@@ -59,35 +60,15 @@ typedef struct metadata {
 
 
 /* details what we expect to find on a single event - and forms a linked
 /* details what we expect to find on a single event - and forms a linked
    list to detail other expectations */
    list to detail other expectations */
-typedef struct expectation {
+struct expectation {
   struct expectation *next;
   struct expectation *next;
   const char *file;
   const char *file;
   int line;
   int line;
   grpc_completion_type type;
   grpc_completion_type type;
   void *tag;
   void *tag;
   int success;
   int success;
-} expectation;
-
-/* the verifier itself */
-struct cq_verifier {
-  /* bound completion queue */
-  grpc_completion_queue *cq;
-  /* start of expectation list */
-  expectation *first_expectation;
 };
 };
 
 
-cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
-  cq_verifier *v = gpr_malloc(sizeof(cq_verifier));
-  v->cq = cq;
-  v->first_expectation = NULL;
-  return v;
-}
-
-void cq_verifier_destroy(cq_verifier *v) {
-  cq_verify(v);
-  gpr_free(v);
-}
-
 static int has_metadata(const grpc_metadata *md, size_t count, const char *key,
 static int has_metadata(const grpc_metadata *md, size_t count, const char *key,
                         const char *value) {
                         const char *value) {
   size_t i;
   size_t i;
@@ -197,7 +178,7 @@ static void expectation_to_strvec(gpr_strvec *buf, expectation *e) {
 static void expectations_to_strvec(gpr_strvec *buf, cq_verifier *v) {
 static void expectations_to_strvec(gpr_strvec *buf, cq_verifier *v) {
   expectation *e;
   expectation *e;
 
 
-  for (e = v->first_expectation; e != NULL; e = e->next) {
+  for (e = cq_verifier_get_first_expectation(v); e != NULL; e = e->next) {
     expectation_to_strvec(buf, e);
     expectation_to_strvec(buf, e);
     gpr_strvec_add(buf, gpr_strdup("\n"));
     gpr_strvec_add(buf, gpr_strdup("\n"));
   }
   }
@@ -217,19 +198,19 @@ static void fail_no_event_received(cq_verifier *v) {
 }
 }
 
 
 void cq_verify(cq_verifier *v) {
 void cq_verify(cq_verifier *v) {
-  const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
-  while (v->first_expectation != NULL) {
-    grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL);
+  int timeout_seconds = 10;
+  while (cq_verifier_get_first_expectation(v) != NULL) {
+    grpc_event ev = cq_verifier_next_event(v, timeout_seconds);
     if (ev.type == GRPC_QUEUE_TIMEOUT) {
     if (ev.type == GRPC_QUEUE_TIMEOUT) {
       fail_no_event_received(v);
       fail_no_event_received(v);
       break;
       break;
     }
     }
     expectation *e;
     expectation *e;
     expectation *prev = NULL;
     expectation *prev = NULL;
-    for (e = v->first_expectation; e != NULL; e = e->next) {
+    for (e = cq_verifier_get_first_expectation(v); e != NULL; e = e->next) {
       if (e->tag == ev.tag) {
       if (e->tag == ev.tag) {
         verify_matches(e, &ev);
         verify_matches(e, &ev);
-        if (e == v->first_expectation) v->first_expectation = e->next;
+        if (e == cq_verifier_get_first_expectation(v)) cq_verifier_set_first_expectation(v, e->next);
         if (prev != NULL) prev->next = e->next;
         if (prev != NULL) prev->next = e->next;
         gpr_free(e);
         gpr_free(e);
         break;
         break;
@@ -253,14 +234,11 @@ void cq_verify(cq_verifier *v) {
 }
 }
 
 
 void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
 void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
-  gpr_timespec deadline =
-      gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
-                   gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN));
   grpc_event ev;
   grpc_event ev;
 
 
-  GPR_ASSERT(v->first_expectation == NULL && "expectation queue must be empty");
+  GPR_ASSERT(cq_verifier_get_first_expectation(v) == NULL && "expectation queue must be empty");
 
 
-  ev = grpc_completion_queue_next(v->cq, deadline, NULL);
+  ev = cq_verifier_next_event(v, timeout_sec);
   if (ev.type != GRPC_QUEUE_TIMEOUT) {
   if (ev.type != GRPC_QUEUE_TIMEOUT) {
     char *s = grpc_event_string(&ev);
     char *s = grpc_event_string(&ev);
     gpr_log(GPR_ERROR, "unexpected event (expected nothing): %s", s);
     gpr_log(GPR_ERROR, "unexpected event (expected nothing): %s", s);
@@ -279,8 +257,8 @@ static void add(cq_verifier *v, const char *file, int line,
   e->line = line;
   e->line = line;
   e->tag = tag;
   e->tag = tag;
   e->success = success;
   e->success = success;
-  e->next = v->first_expectation;
-  v->first_expectation = e;
+  e->next = cq_verifier_get_first_expectation(v);
+  cq_verifier_set_first_expectation(v, e);
 }
 }
 
 
 void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag,
 void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag,

+ 47 - 0
test/core/end2end/cq_verifier_internal.h

@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+#ifndef GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H
+#define GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H
+
+#include "test/core/end2end/cq_verifier.h"
+
+typedef struct expectation expectation;
+
+expectation *cq_verifier_get_first_expectation(cq_verifier *v);
+
+void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e);
+
+grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds);
+
+#endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H */

+ 73 - 0
test/core/end2end/cq_verifier_native.c

@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2016, 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 check is for testing only. */
+#ifndef GRPC_UV
+
+#include "test/core/end2end/cq_verifier_internal.h"
+
+/* the verifier itself */
+struct cq_verifier {
+  /* bound completion queue */
+  grpc_completion_queue *cq;
+  /* start of expectation list */
+  expectation *first_expectation;
+  uv_timer_t timer;
+};
+
+cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
+  cq_verifier *v = gpr_malloc(sizeof(cq_verifier));
+  v->cq = cq;
+  cq_verifier_set_first_expectation(v,NULL);
+  return v;
+}
+
+void cq_verifier_destroy(cq_verifier *v) {
+  cq_verify(v);
+  gpr_free(v);
+}
+
+expectation *cq_verifier_get_first_expectation(cq_verifier *v) {
+  return v->first_expectation;
+}
+
+void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) {
+  v->first_expectation = e;
+}
+
+grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) {
+  const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(timeout_seconds);
+  return grpc_completion_queue_next(v->cq, deadline, NULL);
+}
+
+#endif /* GRPC_UV */

+ 108 - 0
test/core/end2end/cq_verifier_uv.c

@@ -0,0 +1,108 @@
+/*
+ *
+ * Copyright 2016, 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.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#ifdef GRPC_UV
+
+#include <uv.h>
+
+#include <grpc/support/alloc.h>
+
+#include "test/core/end2end/cq_verifier_internal.h"
+
+typedef enum timer_state {
+  TIMER_STARTED,
+  TIMER_TRIGGERED,
+  TIMER_CLOSED
+} timer_state;
+
+/* the verifier itself */
+struct cq_verifier {
+  /* bound completion queue */
+  grpc_completion_queue *cq;
+  /* start of expectation list */
+  expectation *first_expectation;
+  uv_timer_t timer;
+};
+
+cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
+  cq_verifier *v = gpr_malloc(sizeof(cq_verifier));
+  v->cq = cq;
+  v->first_expectation = NULL;
+  uv_timer_init(uv_default_loop(), &v->timer);
+  v->timer.data = (void *)TIMER_STARTED;
+  return v;
+}
+
+void timer_close_cb(uv_handle_t *handle) {
+  handle->data = (void *)TIMER_CLOSED;
+}
+
+void cq_verifier_destroy(cq_verifier *v) {
+  cq_verify(v);
+  uv_close((uv_handle_t *)&v->timer, timer_close_cb);
+  while ((timer_state)v->timer.data != TIMER_CLOSED) {
+    uv_run(uv_default_loop(), UV_RUN_NOWAIT);
+  }
+  gpr_free(v);
+}
+
+expectation *cq_verifier_get_first_expectation(cq_verifier *v) {
+  return v->first_expectation;
+}
+
+void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) {
+  v->first_expectation = e;
+}
+
+void timer_run_cb(uv_timer_t *timer) {
+  timer->data = (void *)TIMER_TRIGGERED;
+}
+
+grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) {
+uint64_t timeout_ms = timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000;
+  grpc_event ev;
+  v->timer.data = (void *)TIMER_STARTED;
+  uv_timer_start(&v->timer, timer_run_cb, timeout_ms, 0);
+  ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL);
+  // Stop the loop if the timer goes off or we get a non-timeout event
+  while (((timer_state)v->timer.data != TIMER_TRIGGERED) &&
+         ev.type == GRPC_QUEUE_TIMEOUT){
+    uv_run(uv_default_loop(), UV_RUN_ONCE);
+    ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL);
+  }
+  return ev;
+}
+
+#endif /* GRPC_UV */

+ 13 - 0
test/core/end2end/dualstack_socket_test.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test won't work except with posix sockets enabled
+#ifdef GRPC_POSIX_SOCKET
+
 #include <string.h>
 #include <string.h>
 
 
 #include <grpc/grpc.h>
 #include <grpc/grpc.h>
@@ -353,3 +358,11 @@ int main(int argc, char **argv) {
 
 
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_SOCKET */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_SOCKET */

+ 13 - 0
test/core/end2end/fixtures/h2_fd.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test won't work except with posix sockets enabled
+#ifdef GRPC_POSIX_SOCKET
+
 #include "test/core/end2end/end2end_tests.h"
 #include "test/core/end2end/end2end_tests.h"
 
 
 #include <fcntl.h>
 #include <fcntl.h>
@@ -126,3 +131,11 @@ int main(int argc, char **argv) {
 
 
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_SOCKET */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_SOCKET */

+ 13 - 0
test/core/end2end/fixtures/h2_full+pipe.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test requires posix wakeup fds
+#ifdef GRPC_POSIX_WAKEUP_FD
+
 #include "test/core/end2end/end2end_tests.h"
 #include "test/core/end2end/end2end_tests.h"
 
 
 #include <string.h>
 #include <string.h>
@@ -119,3 +124,11 @@ int main(int argc, char **argv) {
 
 
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_WAKEUP_FD */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_WAKEUP_FD */

+ 2 - 0
test/core/end2end/fixtures/http_proxy.c

@@ -33,6 +33,8 @@
 
 
 #include "test/core/end2end/fixtures/http_proxy.h"
 #include "test/core/end2end/fixtures/http_proxy.h"
 
 
+#include "src/core/lib/iomgr/sockaddr.h"
+
 #include <string.h>
 #include <string.h>
 
 
 #include <grpc/support/alloc.h>
 #include <grpc/support/alloc.h>

+ 3 - 3
test/core/end2end/fuzzers/api_fuzzer.c

@@ -231,8 +231,8 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
 // defined in tcp_client_posix.c
 // defined in tcp_client_posix.c
 extern void (*grpc_tcp_client_connect_impl)(
 extern void (*grpc_tcp_client_connect_impl)(
     grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
     grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
-    grpc_pollset_set *interested_parties, const struct sockaddr *addr,
-    size_t addr_len, gpr_timespec deadline);
+    grpc_pollset_set *interested_parties, const grpc_resolved_address *addr,
+    gpr_timespec deadline);
 
 
 static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
 static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
                           grpc_endpoint **ep, gpr_timespec deadline);
                           grpc_endpoint **ep, gpr_timespec deadline);
@@ -289,7 +289,7 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
 static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx,
 static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx,
                                   grpc_closure *closure, grpc_endpoint **ep,
                                   grpc_closure *closure, grpc_endpoint **ep,
                                   grpc_pollset_set *interested_parties,
                                   grpc_pollset_set *interested_parties,
-                                  const struct sockaddr *addr, size_t addr_len,
+                                  const grpc_resolved_address *addr,
                                   gpr_timespec deadline) {
                                   gpr_timespec deadline) {
   sched_connect(exec_ctx, closure, ep, deadline);
   sched_connect(exec_ctx, closure, ep, deadline);
 }
 }

+ 4 - 4
test/core/end2end/gen_build_yaml.py

@@ -39,9 +39,9 @@ import hashlib
 
 
 FixtureOptions = collections.namedtuple(
 FixtureOptions = collections.namedtuple(
     'FixtureOptions',
     'FixtureOptions',
-    'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs')
+    'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs exclude_iomgrs')
 default_unsecure_fixture_options = FixtureOptions(
 default_unsecure_fixture_options = FixtureOptions(
-    True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [])
+    True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], [])
 socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False)
 socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False)
 default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True)
 default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True)
 uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'])
 uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'])
@@ -58,7 +58,7 @@ END2END_FIXTURES = {
     'h2_fd': fd_unsecure_fixture_options,
     'h2_fd': fd_unsecure_fixture_options,
     'h2_full': default_unsecure_fixture_options,
     'h2_full': default_unsecure_fixture_options,
     'h2_full+pipe': default_unsecure_fixture_options._replace(
     'h2_full+pipe': default_unsecure_fixture_options._replace(
-        platforms=['linux']),
+        platforms=['linux'], exclude_iomgrs=['uv']),
     'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True),
     'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True),
     'h2_http_proxy': default_unsecure_fixture_options._replace(ci_mac=False),
     'h2_http_proxy': default_unsecure_fixture_options._replace(ci_mac=False),
     'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False),
     'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False),
@@ -280,7 +280,7 @@ def main():
       )
       )
   }
   }
   print yaml.dump(json)
   print yaml.dump(json)
-
+p
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':
   main()
   main()

+ 13 - 0
test/core/iomgr/fd_posix_test.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test won't work except with posix sockets enabled
+#ifdef GRPC_POSIX_SOCKET
+
 #include "src/core/lib/iomgr/ev_posix.h"
 #include "src/core/lib/iomgr/ev_posix.h"
 
 
 #include <ctype.h>
 #include <ctype.h>
@@ -548,3 +553,11 @@ int main(int argc, char **argv) {
   grpc_iomgr_shutdown();
   grpc_iomgr_shutdown();
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_SOCKET */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_SOCKET */

+ 13 - 1
test/core/iomgr/socket_utils_test.c

@@ -31,7 +31,11 @@
  *
  *
  */
  */
 
 
-#include <grpc/support/port_platform.h>
+#include "src/core/lib/iomgr/port.h"
+
+// This test won't work except with posix sockets enabled
+#ifdef GRPC_POSIX_SOCKET
+
 #include "src/core/lib/iomgr/socket_utils_posix.h"
 #include "src/core/lib/iomgr/socket_utils_posix.h"
 
 
 #include <errno.h>
 #include <errno.h>
@@ -68,3 +72,11 @@ int main(int argc, char **argv) {
 
 
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_SOCKET */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_SOCKET */

+ 13 - 0
test/core/iomgr/tcp_posix_test.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test won't work except with posix sockets enabled
+#ifdef GRPC_POSIX_SOCKET
+
 #include "src/core/lib/iomgr/tcp_posix.h"
 #include "src/core/lib/iomgr/tcp_posix.h"
 
 
 #include <errno.h>
 #include <errno.h>
@@ -544,3 +549,11 @@ int main(int argc, char **argv) {
 
 
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_SOCKET */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_SOCKET */

+ 13 - 0
test/core/iomgr/tcp_server_posix_test.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test won't work except with posix sockets enabled
+#ifdef GRPC_POSIX_SOCKET
+
 #include "src/core/lib/iomgr/tcp_server.h"
 #include "src/core/lib/iomgr/tcp_server.h"
 
 
 #include <errno.h>
 #include <errno.h>
@@ -360,3 +365,11 @@ int main(int argc, char **argv) {
   gpr_free(g_pollset);
   gpr_free(g_pollset);
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_POSIX_SOCKET */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_POSIX_SOCKET */

+ 13 - 0
test/core/iomgr/timer_heap_test.c

@@ -31,6 +31,11 @@
  *
  *
  */
  */
 
 
+#include "src/core/lib/iomgr/port.h"
+
+// This test only works with the generic timer implementation
+#ifdef GRPC_TIMER_USE_GENERIC
+
 #include "src/core/lib/iomgr/timer_heap.h"
 #include "src/core/lib/iomgr/timer_heap.h"
 
 
 #include <stdlib.h>
 #include <stdlib.h>
@@ -315,3 +320,11 @@ int main(int argc, char **argv) {
 
 
   return 0;
   return 0;
 }
 }
+
+#else /* GRPC_TIMER_USE_GENERIC */
+
+int main(int argc, char **argv) {
+  return 1;
+}
+
+#endif /* GRPC_TIMER_USE_GENERIC */

+ 1 - 1
test/core/util/port_server_client.c

@@ -80,7 +80,7 @@ void grpc_free_port_using_server(char *server, int port) {
   grpc_httpcli_response rsp;
   grpc_httpcli_response rsp;
   freereq pr;
   freereq pr;
   char *path;
   char *path;
-  grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+  grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_RUN_INNER_LOOP;
   grpc_closure *shutdown_closure;
   grpc_closure *shutdown_closure;
 
 
   grpc_init();
   grpc_init();

+ 58 - 0
test/core/util/port_uv.c

@@ -0,0 +1,58 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+#include "src/core/lib/iomgr/port.h"
+#include "test/core/util/test_config.h"
+#if defined(GRPC_UV) && defined(GRPC_TEST_PICK_PORT)
+
+#include <grpc/support/log.h>
+
+#include "test/core/util/port.h"
+
+int grpc_pick_unused_port(void) {
+  // Temporary implementation
+  return 4242;
+}
+
+int grpc_pick_unused_port_or_die(void) {
+  int port = grpc_pick_unused_port();
+  GPR_ASSERT(port > 0);
+  return port;
+}
+
+void grpc_recycle_unused_port(int port) {
+  // Temporary implementation
+  (void)port;
+}
+
+#endif /* GRPC_UV && GRPC_TEST_PICK_PORT */

+ 1 - 0
tools/doxygen/Doxyfile.c++.internal

@@ -1011,6 +1011,7 @@ src/core/lib/iomgr/closure.c \
 src/core/lib/iomgr/combiner.c \
 src/core/lib/iomgr/combiner.c \
 src/core/lib/iomgr/endpoint.c \
 src/core/lib/iomgr/endpoint.c \
 src/core/lib/iomgr/endpoint_pair_posix.c \
 src/core/lib/iomgr/endpoint_pair_posix.c \
+src/core/lib/iomgr/endpoint_pair_uv.c \
 src/core/lib/iomgr/endpoint_pair_windows.c \
 src/core/lib/iomgr/endpoint_pair_windows.c \
 src/core/lib/iomgr/error.c \
 src/core/lib/iomgr/error.c \
 src/core/lib/iomgr/ev_epoll_linux.c \
 src/core/lib/iomgr/ev_epoll_linux.c \

+ 1 - 0
tools/doxygen/Doxyfile.core.internal

@@ -976,6 +976,7 @@ src/core/lib/iomgr/closure.c \
 src/core/lib/iomgr/combiner.c \
 src/core/lib/iomgr/combiner.c \
 src/core/lib/iomgr/endpoint.c \
 src/core/lib/iomgr/endpoint.c \
 src/core/lib/iomgr/endpoint_pair_posix.c \
 src/core/lib/iomgr/endpoint_pair_posix.c \
+src/core/lib/iomgr/endpoint_pair_uv.c \
 src/core/lib/iomgr/endpoint_pair_windows.c \
 src/core/lib/iomgr/endpoint_pair_windows.c \
 src/core/lib/iomgr/error.c \
 src/core/lib/iomgr/error.c \
 src/core/lib/iomgr/ev_epoll_linux.c \
 src/core/lib/iomgr/ev_epoll_linux.c \

+ 20 - 1
tools/run_tests/run_tests.py

@@ -83,7 +83,7 @@ _DEFAULT_TIMEOUT_SECONDS = 5 * 60
 # SimpleConfig: just compile with CONFIG=config, and run the binary to test
 # SimpleConfig: just compile with CONFIG=config, and run the binary to test
 class Config(object):
 class Config(object):
 
 
-  def __init__(self, config, environ=None, timeout_multiplier=1, tool_prefix=[]):
+  def __init__(self, config, environ=None, timeout_multiplier=1, tool_prefix=[], iomgr_platform='native'):
     if environ is None:
     if environ is None:
       environ = {}
       environ = {}
     self.build_config = config
     self.build_config = config
@@ -91,6 +91,7 @@ class Config(object):
     self.environ['CONFIG'] = config
     self.environ['CONFIG'] = config
     self.tool_prefix = tool_prefix
     self.tool_prefix = tool_prefix
     self.timeout_multiplier = timeout_multiplier
     self.timeout_multiplier = timeout_multiplier
+    self.iomgr_platform = iomgr_platform
 
 
   def job_spec(self, cmdline, timeout_seconds=_DEFAULT_TIMEOUT_SECONDS,
   def job_spec(self, cmdline, timeout_seconds=_DEFAULT_TIMEOUT_SECONDS,
                shortname=None, environ={}, cpu_cost=1.0, flaky=False):
                shortname=None, environ={}, cpu_cost=1.0, flaky=False):
@@ -202,6 +203,18 @@ class CLanguage(object):
     else:
     else:
       self._docker_distro, self._make_options = self._compiler_options(self.args.use_docker,
       self._docker_distro, self._make_options = self._compiler_options(self.args.use_docker,
                                                                        self.args.compiler)
                                                                        self.args.compiler)
+    if args.iomgr_platform == "uv":
+      cflags = '-DGRPC_UV '
+      try:
+        cflags += subprocess.check_output(['pkg-config', '--cflags', 'libuv']).strip() + ' '
+      except subprocess.CalledProcessError:
+        pass
+      try:
+        ldflags = subprocess.check_output(['pkg-config', '--libs', 'libuv']).strip() + ' '
+      except subprocess.CalledProcessError:
+        ldflags = '-luv '
+      self._make_options += ['EXTRA_CPPFLAGS={}'.format(cflags),
+                             'EXTRA_LDLIBS={}'.format(ldflags)]
 
 
   def test_specs(self):
   def test_specs(self):
     out = []
     out = []
@@ -218,6 +231,8 @@ class CLanguage(object):
         shortname_ext = '' if polling_strategy=='all' else ' GRPC_POLL_STRATEGY=%s' % polling_strategy
         shortname_ext = '' if polling_strategy=='all' else ' GRPC_POLL_STRATEGY=%s' % polling_strategy
         if self.config.build_config in target['exclude_configs']:
         if self.config.build_config in target['exclude_configs']:
           continue
           continue
+        if self.args.iomgr_platform in target.get('exclude_iomgrs', []):
+          continue
         if self.platform == 'windows':
         if self.platform == 'windows':
           binary = 'vsprojects/%s%s/%s.exe' % (
           binary = 'vsprojects/%s%s/%s.exe' % (
               'x64/' if self.args.arch == 'x64' else '',
               'x64/' if self.args.arch == 'x64' else '',
@@ -1003,6 +1018,10 @@ argp.add_argument('--compiler',
                            'coreclr'],
                            'coreclr'],
                   default='default',
                   default='default',
                   help='Selects compiler to use. Allowed values depend on the platform and language.')
                   help='Selects compiler to use. Allowed values depend on the platform and language.')
+argp.add_argument('--iomgr_platform',
+                  choices=['native', 'uv'],
+                  default='native',
+                  help='Selects iomgr platform to build on')
 argp.add_argument('--build_only',
 argp.add_argument('--build_only',
                   default=False,
                   default=False,
                   action='store_const',
                   action='store_const',

+ 6 - 0
tools/run_tests/sources_and_headers.json

@@ -6111,6 +6111,7 @@
       "src/core/lib/iomgr/endpoint.h", 
       "src/core/lib/iomgr/endpoint.h", 
       "src/core/lib/iomgr/endpoint_pair.h", 
       "src/core/lib/iomgr/endpoint_pair.h", 
       "src/core/lib/iomgr/endpoint_pair_posix.c", 
       "src/core/lib/iomgr/endpoint_pair_posix.c", 
+      "src/core/lib/iomgr/endpoint_pair_uv.c", 
       "src/core/lib/iomgr/endpoint_pair_windows.c", 
       "src/core/lib/iomgr/endpoint_pair_windows.c", 
       "src/core/lib/iomgr/error.c", 
       "src/core/lib/iomgr/error.c", 
       "src/core/lib/iomgr/error.h", 
       "src/core/lib/iomgr/error.h", 
@@ -6549,6 +6550,7 @@
     ], 
     ], 
     "headers": [
     "headers": [
       "test/core/end2end/cq_verifier.h", 
       "test/core/end2end/cq_verifier.h", 
+      "test/core/end2end/cq_verifier_internal.h", 
       "test/core/end2end/fixtures/http_proxy.h", 
       "test/core/end2end/fixtures/http_proxy.h", 
       "test/core/end2end/fixtures/proxy.h", 
       "test/core/end2end/fixtures/proxy.h", 
       "test/core/iomgr/endpoint_tests.h", 
       "test/core/iomgr/endpoint_tests.h", 
@@ -6566,6 +6568,9 @@
     "src": [
     "src": [
       "test/core/end2end/cq_verifier.c", 
       "test/core/end2end/cq_verifier.c", 
       "test/core/end2end/cq_verifier.h", 
       "test/core/end2end/cq_verifier.h", 
+      "test/core/end2end/cq_verifier_internal.h", 
+      "test/core/end2end/cq_verifier_native.c", 
+      "test/core/end2end/cq_verifier_uv.c", 
       "test/core/end2end/fixtures/http_proxy.c", 
       "test/core/end2end/fixtures/http_proxy.c", 
       "test/core/end2end/fixtures/http_proxy.h", 
       "test/core/end2end/fixtures/http_proxy.h", 
       "test/core/end2end/fixtures/proxy.c", 
       "test/core/end2end/fixtures/proxy.c", 
@@ -6586,6 +6591,7 @@
       "test/core/util/port_posix.c", 
       "test/core/util/port_posix.c", 
       "test/core/util/port_server_client.c", 
       "test/core/util/port_server_client.c", 
       "test/core/util/port_server_client.h", 
       "test/core/util/port_server_client.h", 
+      "test/core/util/port_uv.c", 
       "test/core/util/port_windows.c", 
       "test/core/util/port_windows.c", 
       "test/core/util/slice_splitter.c", 
       "test/core/util/slice_splitter.c", 
       "test/core/util/slice_splitter.h"
       "test/core/util/slice_splitter.h"

File diff suppressed because it is too large
+ 136 - 0
tools/run_tests/tests.json


+ 2 - 0
vsprojects/vcxproj/grpc++/grpc++.vcxproj

@@ -565,6 +565,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">

+ 3 - 0
vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters

@@ -157,6 +157,9 @@
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+      <Filter>src\core\lib\iomgr</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>

+ 2 - 0
vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj

@@ -551,6 +551,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">

+ 3 - 0
vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters

@@ -142,6 +142,9 @@
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+      <Filter>src\core\lib\iomgr</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>

+ 2 - 0
vsprojects/vcxproj/grpc/grpc.vcxproj

@@ -507,6 +507,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">

+ 3 - 0
vsprojects/vcxproj/grpc/grpc.vcxproj.filters

@@ -61,6 +61,9 @@
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+      <Filter>src\core\lib\iomgr</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>

+ 9 - 0
vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj

@@ -176,6 +176,7 @@
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\data\ssl_test_data.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\data\ssl_test_data.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\security\oauth2_utils.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\security\oauth2_utils.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h" />
+    <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_internal.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.h" />
@@ -290,6 +291,10 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_native.c">
+    </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.c">
@@ -310,6 +315,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\util\port_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
@@ -352,6 +359,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">

+ 15 - 0
vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters

@@ -19,6 +19,12 @@
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
       <Filter>test\core\end2end</Filter>
       <Filter>test\core\end2end</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_native.c">
+      <Filter>test\core\end2end</Filter>
+    </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_uv.c">
+      <Filter>test\core\end2end</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
       <Filter>test\core\end2end\fixtures</Filter>
       <Filter>test\core\end2end\fixtures</Filter>
     </ClCompile>
     </ClCompile>
@@ -49,6 +55,9 @@
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
       <Filter>test\core\util</Filter>
       <Filter>test\core\util</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\util\port_uv.c">
+      <Filter>test\core\util</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
       <Filter>test\core\util</Filter>
       <Filter>test\core\util</Filter>
     </ClCompile>
     </ClCompile>
@@ -112,6 +121,9 @@
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+      <Filter>src\core\lib\iomgr</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>
@@ -446,6 +458,9 @@
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h">
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h">
       <Filter>test\core\end2end</Filter>
       <Filter>test\core\end2end</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_internal.h">
+      <Filter>test\core\end2end</Filter>
+    </ClInclude>
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h">
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h">
       <Filter>test\core\end2end\fixtures</Filter>
       <Filter>test\core\end2end\fixtures</Filter>
     </ClInclude>
     </ClInclude>

+ 7 - 0
vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj

@@ -148,6 +148,7 @@
 
 
   <ItemGroup>
   <ItemGroup>
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h" />
+    <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_internal.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.h" />
     <ClInclude Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.h" />
@@ -163,6 +164,10 @@
   <ItemGroup>
   <ItemGroup>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_native.c">
+    </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.c">
@@ -183,6 +188,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\util\port_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">

+ 12 - 0
vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters

@@ -4,6 +4,12 @@
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
       <Filter>test\core\end2end</Filter>
       <Filter>test\core\end2end</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_native.c">
+      <Filter>test\core\end2end</Filter>
+    </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_uv.c">
+      <Filter>test\core\end2end</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.c">
       <Filter>test\core\end2end\fixtures</Filter>
       <Filter>test\core\end2end\fixtures</Filter>
     </ClCompile>
     </ClCompile>
@@ -34,6 +40,9 @@
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
       <Filter>test\core\util</Filter>
       <Filter>test\core\util</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\test\core\util\port_uv.c">
+      <Filter>test\core\util</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
     <ClCompile Include="$(SolutionDir)\..\test\core\util\port_windows.c">
       <Filter>test\core\util</Filter>
       <Filter>test\core\util</Filter>
     </ClCompile>
     </ClCompile>
@@ -45,6 +54,9 @@
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h">
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h">
       <Filter>test\core\end2end</Filter>
       <Filter>test\core\end2end</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier_internal.h">
+      <Filter>test\core\end2end</Filter>
+    </ClInclude>
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h">
     <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy.h">
       <Filter>test\core\end2end\fixtures</Filter>
       <Filter>test\core\end2end\fixtures</Filter>
     </ClInclude>
     </ClInclude>

+ 2 - 0
vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj

@@ -475,6 +475,8 @@
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     </ClCompile>
     </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">

+ 3 - 0
vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters

@@ -64,6 +64,9 @@
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+      <Filter>src\core\lib\iomgr</Filter>
+    </ClCompile>
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
     <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
       <Filter>src\core\lib\iomgr</Filter>
       <Filter>src\core\lib\iomgr</Filter>
     </ClCompile>
     </ClCompile>

Some files were not shown because too many files changed in this diff