From 5cb79621d0d958eb3439f40700ac16240de5b65d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 15 Mar 2016 14:46:54 -0700 Subject: Initial canaries for downstream merges --- Makefile | 102 +++++++++++ build.yaml | 33 ++++ test/core/internal_api_canaries/iomgr.c | 115 ++++++++++++ test/core/internal_api_canaries/support.c | 58 ++++++ test/core/internal_api_canaries/transport.c | 81 +++++++++ tools/run_tests/sources_and_headers.json | 48 +++++ vsprojects/buildtests_c.sln | 81 +++++++++ .../internal_api_canary_iomgr_test.vcxproj | 199 +++++++++++++++++++++ .../internal_api_canary_iomgr_test.vcxproj.filters | 21 +++ .../internal_api_canary_support_test.vcxproj | 199 +++++++++++++++++++++ ...nternal_api_canary_support_test.vcxproj.filters | 21 +++ .../internal_api_canary_transport_test.vcxproj | 199 +++++++++++++++++++++ ...ernal_api_canary_transport_test.vcxproj.filters | 21 +++ 13 files changed, 1178 insertions(+) create mode 100644 test/core/internal_api_canaries/iomgr.c create mode 100644 test/core/internal_api_canaries/support.c create mode 100644 test/core/internal_api_canaries/transport.c create mode 100644 vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj create mode 100644 vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj create mode 100644 vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj create mode 100644 vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters diff --git a/Makefile b/Makefile index f118d54253..3952f93571 100644 --- a/Makefile +++ b/Makefile @@ -901,6 +901,9 @@ httpcli_parser_test: $(BINDIR)/$(CONFIG)/httpcli_parser_test httpcli_test: $(BINDIR)/$(CONFIG)/httpcli_test httpscli_test: $(BINDIR)/$(CONFIG)/httpscli_test init_test: $(BINDIR)/$(CONFIG)/init_test +internal_api_canary_iomgr_test: $(BINDIR)/$(CONFIG)/internal_api_canary_iomgr_test +internal_api_canary_support_test: $(BINDIR)/$(CONFIG)/internal_api_canary_support_test +internal_api_canary_transport_test: $(BINDIR)/$(CONFIG)/internal_api_canary_transport_test invalid_call_argument_test: $(BINDIR)/$(CONFIG)/invalid_call_argument_test json_rewrite: $(BINDIR)/$(CONFIG)/json_rewrite json_rewrite_test: $(BINDIR)/$(CONFIG)/json_rewrite_test @@ -1207,6 +1210,9 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/httpcli_test \ $(BINDIR)/$(CONFIG)/httpscli_test \ $(BINDIR)/$(CONFIG)/init_test \ + $(BINDIR)/$(CONFIG)/internal_api_canary_iomgr_test \ + $(BINDIR)/$(CONFIG)/internal_api_canary_support_test \ + $(BINDIR)/$(CONFIG)/internal_api_canary_transport_test \ $(BINDIR)/$(CONFIG)/invalid_call_argument_test \ $(BINDIR)/$(CONFIG)/json_rewrite \ $(BINDIR)/$(CONFIG)/json_rewrite_test \ @@ -7747,6 +7753,102 @@ endif endif +INTERNAL_API_CANARY_IOMGR_TEST_SRC = \ + test/core/internal_api_canaries/iomgr.c \ + +INTERNAL_API_CANARY_IOMGR_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(INTERNAL_API_CANARY_IOMGR_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/internal_api_canary_iomgr_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/internal_api_canary_iomgr_test: $(INTERNAL_API_CANARY_IOMGR_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) $(LD) $(LDFLAGS) $(INTERNAL_API_CANARY_IOMGR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/internal_api_canary_iomgr_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/internal_api_canaries/iomgr.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_internal_api_canary_iomgr_test: $(INTERNAL_API_CANARY_IOMGR_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(INTERNAL_API_CANARY_IOMGR_TEST_OBJS:.o=.dep) +endif +endif + + +INTERNAL_API_CANARY_SUPPORT_TEST_SRC = \ + test/core/internal_api_canaries/iomgr.c \ + +INTERNAL_API_CANARY_SUPPORT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(INTERNAL_API_CANARY_SUPPORT_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/internal_api_canary_support_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/internal_api_canary_support_test: $(INTERNAL_API_CANARY_SUPPORT_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) $(LD) $(LDFLAGS) $(INTERNAL_API_CANARY_SUPPORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/internal_api_canary_support_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/internal_api_canaries/iomgr.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_internal_api_canary_support_test: $(INTERNAL_API_CANARY_SUPPORT_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(INTERNAL_API_CANARY_SUPPORT_TEST_OBJS:.o=.dep) +endif +endif + + +INTERNAL_API_CANARY_TRANSPORT_TEST_SRC = \ + test/core/internal_api_canaries/iomgr.c \ + +INTERNAL_API_CANARY_TRANSPORT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(INTERNAL_API_CANARY_TRANSPORT_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/internal_api_canary_transport_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/internal_api_canary_transport_test: $(INTERNAL_API_CANARY_TRANSPORT_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) $(LD) $(LDFLAGS) $(INTERNAL_API_CANARY_TRANSPORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/internal_api_canary_transport_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/internal_api_canaries/iomgr.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_internal_api_canary_transport_test: $(INTERNAL_API_CANARY_TRANSPORT_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(INTERNAL_API_CANARY_TRANSPORT_TEST_OBJS:.o=.dep) +endif +endif + + INVALID_CALL_ARGUMENT_TEST_SRC = \ test/core/end2end/invalid_call_argument_test.c \ diff --git a/build.yaml b/build.yaml index 83b7714e65..a7365a34a3 100644 --- a/build.yaml +++ b/build.yaml @@ -1578,6 +1578,39 @@ targets: - grpc - gpr_test_util - gpr +- name: internal_api_canary_iomgr_test + build: test + run: false + language: c + src: + - test/core/internal_api_canaries/iomgr.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr +- name: internal_api_canary_support_test + build: test + run: false + language: c + src: + - test/core/internal_api_canaries/iomgr.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr +- name: internal_api_canary_transport_test + build: test + run: false + language: c + src: + - test/core/internal_api_canaries/iomgr.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: invalid_call_argument_test build: test language: c diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c new file mode 100644 index 0000000000..3b1a1bb899 --- /dev/null +++ b/test/core/internal_api_canaries/iomgr.c @@ -0,0 +1,115 @@ +/* + * + * Copyright 2015-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/iomgr/iomgr.h" +#include "src/core/iomgr/closure.h" +#include "src/core/iomgr/endpoint.h" +#include "src/core/iomgr/exec_ctx.h" +#include "src/core/iomgr/executor.h" + +/******************************************************************************* + * NOTE: If this test fails to compile, then the api changes are likely to cause + * merge failures downstream. Please pay special attention to reviewing + * these changes, and solicit help as appropriate when merging downstream. + * + * This test is NOT expected to be run directly. + ******************************************************************************/ + +static void test_code(void) { + /* iomgr.h */ + grpc_iomgr_init(); + grpc_iomgr_shutdown(); + + /* closure.h */ + grpc_closure closure; + closure.cb = NULL; + closure.cb_arg = NULL; + closure.final_data = 0; + + grpc_closure_list closure_list = GRPC_CLOSURE_LIST_INIT; + closure_list.head = NULL; + closure_list.tail = NULL; + + grpc_closure_init(&closure, NULL, NULL); + + grpc_closure_create(NULL, NULL); + + grpc_closure_list_move(NULL, NULL); + grpc_closure_list_add(NULL, NULL, true); + bool x = grpc_closure_list_empty(closure_list); + grpc_closure_next(&closure); + + /* endpoint.h */ + grpc_endpoint_read(NULL, NULL, NULL, NULL); + grpc_endpoint_get_peer(NULL); + grpc_endpoint_write(NULL, NULL, NULL, NULL); + grpc_endpoint_shutdown(NULL, NULL); + grpc_endpoint_destroy(NULL, NULL); + grpc_endpoint_add_to_pollset(NULL, NULL, NULL); + grpc_endpoint_add_to_pollset_set(NULL, NULL, NULL); + + grpc_endpoint endpoint; + grpc_endpoint_vtable vtable = { + grpc_endpoint_read, grpc_endpoint_write, + grpc_endpoint_add_to_pollset, grpc_endpoint_add_to_pollset_set, + grpc_endpoint_shutdown, grpc_endpoint_destroy, + grpc_endpoint_get_peer}; + endpoint.vtable = &vtable; + + /* exec_ctx.h */ + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_exec_ctx_flush(&exec_ctx); + grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_enqueue(&exec_ctx, &closure, x, NULL); + grpc_exec_ctx_enqueue_list(&exec_ctx, &closure_list, NULL); + + /* executor.h */ + grpc_executor_init(); + grpc_executor_enqueue(&closure, x); + grpc_executor_shutdown(); + + /* pollset.h */ + grpc_pollset_size(); + grpc_pollset_init(NULL, NULL); + grpc_pollset_shutdown(NULL, NULL, NULL); + grpc_pollset_reset(NULL); + grpc_pollset_destroy(NULL); + grpc_pollset_work(NULL, NULL, NULL, gpr_now(GPR_CLOCK_REALTIME), + gpr_now(GPR_CLOCK_MONOTONIC)); + grpc_pollset_kick(NULL, NULL); +} + +int main(void) { + if (false) test_code(); + return 0; +} diff --git a/test/core/internal_api_canaries/support.c b/test/core/internal_api_canaries/support.c new file mode 100644 index 0000000000..e964f71e4c --- /dev/null +++ b/test/core/internal_api_canaries/support.c @@ -0,0 +1,58 @@ +/* + * + * Copyright 2015-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. + * + */ + +/******************************************************************************* + * NOTE: If this test fails to compile, then the api changes are likely to cause + * merge failures downstream. Please pay special attention to reviewing + * these changes, and solicit help as appropriate when merging downstream. + * + * This test is NOT expected to be run directly. + ******************************************************************************/ + +#include "src/core/support/env.h" +#include "src/core/support/load_file.h" +#include "src/core/support/tmpfile.h" + +static void test_code(void) { + /* env.h */ + gpr_set_env("abc", gpr_getenv("xyz")); + /* load_file.h */ + gpr_load_file("abc", 1, NULL); + /* tmpfile.h */ + fclose(gpr_tmpfile("foo", NULL)); +} + +int main(void) { + if (false) test_code(); + return 0; +} diff --git a/test/core/internal_api_canaries/transport.c b/test/core/internal_api_canaries/transport.c new file mode 100644 index 0000000000..474a8a11ec --- /dev/null +++ b/test/core/internal_api_canaries/transport.c @@ -0,0 +1,81 @@ +/* + * + * Copyright 2015-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. + * + */ + +/******************************************************************************* + * NOTE: If this test fails to compile, then the api changes are likely to cause + * merge failures downstream. Please pay special attention to reviewing + * these changes, and solicit help as appropriate when merging downstream. + * + * This test is NOT expected to be run directly. + ******************************************************************************/ + +#include "src/core/transport/transport.h" +#include "src/core/transport/transport_impl.h" + +static void test_code(void) { + /* transport_impl.h */ + grpc_transport transport; + grpc_transport_vtable vtable = {12345, + grpc_transport_init_stream, + grpc_transport_set_pollset, + grpc_transport_perform_stream_op, + grpc_transport_perform_op, + grpc_transport_destroy_stream, + grpc_transport_destroy, + grpc_transport_get_peer}; + transport.vtable = &vtable; + + /* transport.h */ + GRPC_STREAM_REF_INIT(NULL, 0, NULL, NULL, "xyz"); + GPR_ASSERT(0 == grpc_transport_stream_size(NULL)); + GPR_ASSERT(grpc_transport_init_stream(&transport, NULL, NULL, NULL, NULL)); + grpc_transport_set_pollset(&transport, NULL, NULL, NULL); + grpc_transport_destroy_stream(&transport, NULL, NULL); + grpc_transport_stream_op_finish_with_failure(NULL, NULL); + grpc_transport_stream_op_add_cancellation(NULL, GRPC_STATUS_UNAVAILABLE); + grpc_transport_stream_op_add_close(NULL, GRPC_STATUS_UNAVAILABLE, + grpc_transport_op_string(NULL)); + grpc_transport_perform_stream_op(&transport, NULL, NULL, NULL); + grpc_transport_perform_op(&transport, NULL, NULL); + grpc_transport_ping(&transport, NULL); + grpc_transport_goaway(&transport, GRPC_STATUS_UNAVAILABLE, + gpr_slice_malloc(0)); + grpc_transport_close(&transport); + grpc_transport_destroy(&transport, NULL); + GPR_ASSERT("xyz" == grpc_transport_get_peer(&transport, NULL)); +} + +int main(void) { + if (false) test_code(); + return 0; +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 092ed35ad9..ea2ab24163 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -980,6 +980,54 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "internal_api_canary_iomgr_test", + "src": [ + "test/core/internal_api_canaries/iomgr.c" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "internal_api_canary_support_test", + "src": [ + "test/core/internal_api_canaries/iomgr.c" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "internal_api_canary_transport_test", + "src": [ + "test/core/internal_api_canaries/iomgr.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 413ed3e3f3..fdc32175cf 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -693,6 +693,39 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "init_test", "vcxproj\test\i {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "internal_api_canary_iomgr_test", "vcxproj\test\internal_api_canary_iomgr_test\internal_api_canary_iomgr_test.vcxproj", "{28AE726B-1BFB-202B-48D2-41AF9D09B9EA}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "internal_api_canary_support_test", "vcxproj\test\internal_api_canary_support_test\internal_api_canary_support_test.vcxproj", "{D53575C6-713C-E6E3-FD74-E65F20916498}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "internal_api_canary_transport_test", "vcxproj\test\internal_api_canary_transport_test\internal_api_canary_transport_test.vcxproj", "{ED24E700-964E-B426-6A6A-1944E2EF7BCB}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "invalid_call_argument_test", "vcxproj\test\invalid_call_argument_test\invalid_call_argument_test.vcxproj", "{C32CA8A3-58E6-8EB9-B72F-C295547D36A6}" ProjectSection(myProperties) = preProject lib = "False" @@ -2462,6 +2495,54 @@ Global {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|Win32.Build.0 = Release|Win32 {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|x64.ActiveCfg = Release|x64 {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release-DLL|x64.Build.0 = Release|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|x64.ActiveCfg = Debug|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|Win32.ActiveCfg = Release|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|x64.ActiveCfg = Release|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|Win32.Build.0 = Debug|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug|x64.Build.0 = Debug|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|Win32.Build.0 = Release|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release|x64.Build.0 = Release|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Debug-DLL|x64.Build.0 = Debug|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|Win32.Build.0 = Release|Win32 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|x64.ActiveCfg = Release|x64 + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA}.Release-DLL|x64.Build.0 = Release|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|Win32.ActiveCfg = Debug|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|x64.ActiveCfg = Debug|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|Win32.ActiveCfg = Release|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|x64.ActiveCfg = Release|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|Win32.Build.0 = Debug|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug|x64.Build.0 = Debug|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|Win32.Build.0 = Release|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release|x64.Build.0 = Release|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Debug-DLL|x64.Build.0 = Debug|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|Win32.Build.0 = Release|Win32 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|x64.ActiveCfg = Release|x64 + {D53575C6-713C-E6E3-FD74-E65F20916498}.Release-DLL|x64.Build.0 = Release|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|Win32.ActiveCfg = Debug|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|x64.ActiveCfg = Debug|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|Win32.ActiveCfg = Release|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|x64.ActiveCfg = Release|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|Win32.Build.0 = Debug|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug|x64.Build.0 = Debug|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|Win32.Build.0 = Release|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release|x64.Build.0 = Release|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Debug-DLL|x64.Build.0 = Debug|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|Win32.Build.0 = Release|Win32 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|x64.ActiveCfg = Release|x64 + {ED24E700-964E-B426-6A6A-1944E2EF7BCB}.Release-DLL|x64.Build.0 = Release|x64 {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug|Win32.ActiveCfg = Debug|Win32 {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Debug|x64.ActiveCfg = Debug|x64 {C32CA8A3-58E6-8EB9-B72F-C295547D36A6}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj b/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj new file mode 100644 index 0000000000..11d89a01c1 --- /dev/null +++ b/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {28AE726B-1BFB-202B-48D2-41AF9D09B9EA} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + internal_api_canary_iomgr_test + static + Debug + static + Debug + + + internal_api_canary_iomgr_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters b/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters new file mode 100644 index 0000000000..f1ee82d1f4 --- /dev/null +++ b/vsprojects/vcxproj/test/internal_api_canary_iomgr_test/internal_api_canary_iomgr_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\internal_api_canaries + + + + + + {881986d1-d1fe-b377-cf26-b3377af95009} + + + {4f9a544e-5680-18ee-30d7-38179bf82cee} + + + {6ab29f78-ec9d-d63a-8e8f-0d7552b3edd4} + + + + diff --git a/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj b/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj new file mode 100644 index 0000000000..59092dc2b3 --- /dev/null +++ b/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D53575C6-713C-E6E3-FD74-E65F20916498} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + internal_api_canary_support_test + static + Debug + static + Debug + + + internal_api_canary_support_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters b/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters new file mode 100644 index 0000000000..f7f4e3200e --- /dev/null +++ b/vsprojects/vcxproj/test/internal_api_canary_support_test/internal_api_canary_support_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\internal_api_canaries + + + + + + {a6c31cba-af9d-78ea-8980-8b77c9fc4485} + + + {d84283b8-4529-6c09-18bf-20a69f14f7ab} + + + {ea379f93-9285-7180-0d69-24a56da2b201} + + + + diff --git a/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj b/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj new file mode 100644 index 0000000000..110f7e3b04 --- /dev/null +++ b/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {ED24E700-964E-B426-6A6A-1944E2EF7BCB} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + internal_api_canary_transport_test + static + Debug + static + Debug + + + internal_api_canary_transport_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters b/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters new file mode 100644 index 0000000000..1e0b4c5557 --- /dev/null +++ b/vsprojects/vcxproj/test/internal_api_canary_transport_test/internal_api_canary_transport_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\internal_api_canaries + + + + + + {38e59e26-aad9-60fd-a1a7-c8fd9b606e2f} + + + {79aad60f-59b8-09e2-2cad-5b5e083ac008} + + + {e4f0214e-e3ec-b5b8-c00b-2932b5ec2422} + + + + -- cgit v1.2.3 From 2a577fb7936ad33793cbbd652b496209382a8c17 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 15 Mar 2016 16:44:34 -0700 Subject: clang-format --- test/core/internal_api_canaries/iomgr.c | 7 +++---- test/core/internal_api_canaries/transport.c | 13 +++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 3b1a1bb899..cd74ccc562 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -80,10 +80,9 @@ static void test_code(void) { grpc_endpoint endpoint; grpc_endpoint_vtable vtable = { - grpc_endpoint_read, grpc_endpoint_write, - grpc_endpoint_add_to_pollset, grpc_endpoint_add_to_pollset_set, - grpc_endpoint_shutdown, grpc_endpoint_destroy, - grpc_endpoint_get_peer}; + grpc_endpoint_read, grpc_endpoint_write, grpc_endpoint_add_to_pollset, + grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown, + grpc_endpoint_destroy, grpc_endpoint_get_peer}; endpoint.vtable = &vtable; /* exec_ctx.h */ diff --git a/test/core/internal_api_canaries/transport.c b/test/core/internal_api_canaries/transport.c index 474a8a11ec..006d4cfd81 100644 --- a/test/core/internal_api_canaries/transport.c +++ b/test/core/internal_api_canaries/transport.c @@ -45,14 +45,11 @@ static void test_code(void) { /* transport_impl.h */ grpc_transport transport; - grpc_transport_vtable vtable = {12345, - grpc_transport_init_stream, - grpc_transport_set_pollset, - grpc_transport_perform_stream_op, - grpc_transport_perform_op, - grpc_transport_destroy_stream, - grpc_transport_destroy, - grpc_transport_get_peer}; + grpc_transport_vtable vtable = { + 12345, grpc_transport_init_stream, grpc_transport_set_pollset, + grpc_transport_perform_stream_op, grpc_transport_perform_op, + grpc_transport_destroy_stream, grpc_transport_destroy, + grpc_transport_get_peer}; transport.vtable = &vtable; /* transport.h */ -- cgit v1.2.3 From ca5acf819d94e8c3de4a28d0a8f6dedc3068148f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 29 Mar 2016 07:38:27 -0700 Subject: Fix test by naming parameters --- test/core/internal_api_canaries/iomgr.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index cd74ccc562..647ccb9df9 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -69,22 +69,6 @@ static void test_code(void) { bool x = grpc_closure_list_empty(closure_list); grpc_closure_next(&closure); - /* endpoint.h */ - grpc_endpoint_read(NULL, NULL, NULL, NULL); - grpc_endpoint_get_peer(NULL); - grpc_endpoint_write(NULL, NULL, NULL, NULL); - grpc_endpoint_shutdown(NULL, NULL); - grpc_endpoint_destroy(NULL, NULL); - grpc_endpoint_add_to_pollset(NULL, NULL, NULL); - grpc_endpoint_add_to_pollset_set(NULL, NULL, NULL); - - grpc_endpoint endpoint; - grpc_endpoint_vtable vtable = { - grpc_endpoint_read, grpc_endpoint_write, grpc_endpoint_add_to_pollset, - grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown, - grpc_endpoint_destroy, grpc_endpoint_get_peer}; - endpoint.vtable = &vtable; - /* exec_ctx.h */ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_exec_ctx_flush(&exec_ctx); @@ -92,6 +76,23 @@ static void test_code(void) { grpc_exec_ctx_enqueue(&exec_ctx, &closure, x, NULL); grpc_exec_ctx_enqueue_list(&exec_ctx, &closure_list, NULL); + /* endpoint.h */ + grpc_endpoint endpoint; + grpc_endpoint_vtable vtable = { + grpc_endpoint_read, grpc_endpoint_write, + grpc_endpoint_add_to_pollset, grpc_endpoint_add_to_pollset_set, + grpc_endpoint_shutdown, grpc_endpoint_destroy, + grpc_endpoint_get_peer}; + endpoint.vtable = &vtable; + + grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); + grpc_endpoint_get_peer(&endpoint); + grpc_endpoint_write(&exec_ctx, &endpoint, NULL, NULL); + grpc_endpoint_shutdown(&exec_ctx, &endpoint); + grpc_endpoint_destroy(&exec_ctx, &endpoint); + grpc_endpoint_add_to_pollset(&exec_ctx, &endpoint, NULL); + grpc_endpoint_add_to_pollset_set(&exec_ctx, &endpoint, NULL); + /* executor.h */ grpc_executor_init(); grpc_executor_enqueue(&closure, x); -- cgit v1.2.3 From 1206423aa229bf2bce4a07ffc26c12e6dd8d9eb6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 29 Mar 2016 07:40:47 -0700 Subject: Fix include paths --- test/core/internal_api_canaries/iomgr.c | 10 +++++----- test/core/internal_api_canaries/support.c | 6 +++--- test/core/internal_api_canaries/transport.c | 17 ++++++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 647ccb9df9..04d66994cd 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -31,11 +31,11 @@ * */ -#include "src/core/iomgr/iomgr.h" -#include "src/core/iomgr/closure.h" -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/exec_ctx.h" -#include "src/core/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/executor.h" /******************************************************************************* * NOTE: If this test fails to compile, then the api changes are likely to cause diff --git a/test/core/internal_api_canaries/support.c b/test/core/internal_api_canaries/support.c index e964f71e4c..7e00e0d2ff 100644 --- a/test/core/internal_api_canaries/support.c +++ b/test/core/internal_api_canaries/support.c @@ -39,9 +39,9 @@ * This test is NOT expected to be run directly. ******************************************************************************/ -#include "src/core/support/env.h" -#include "src/core/support/load_file.h" -#include "src/core/support/tmpfile.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/load_file.h" +#include "src/core/lib/support/tmpfile.h" static void test_code(void) { /* env.h */ diff --git a/test/core/internal_api_canaries/transport.c b/test/core/internal_api_canaries/transport.c index 006d4cfd81..01daabaa56 100644 --- a/test/core/internal_api_canaries/transport.c +++ b/test/core/internal_api_canaries/transport.c @@ -39,17 +39,20 @@ * This test is NOT expected to be run directly. ******************************************************************************/ -#include "src/core/transport/transport.h" -#include "src/core/transport/transport_impl.h" +#include "src/core/lib/transport/transport.h" +#include "src/core/lib/transport/transport_impl.h" static void test_code(void) { /* transport_impl.h */ grpc_transport transport; - grpc_transport_vtable vtable = { - 12345, grpc_transport_init_stream, grpc_transport_set_pollset, - grpc_transport_perform_stream_op, grpc_transport_perform_op, - grpc_transport_destroy_stream, grpc_transport_destroy, - grpc_transport_get_peer}; + grpc_transport_vtable vtable = {12345, + grpc_transport_init_stream, + grpc_transport_set_pollset, + grpc_transport_perform_stream_op, + grpc_transport_perform_op, + grpc_transport_destroy_stream, + grpc_transport_destroy, + grpc_transport_get_peer}; transport.vtable = &vtable; /* transport.h */ -- cgit v1.2.3