aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-17 07:43:22 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-17 07:43:22 -0700
commit36bf4d55e14d4cb090e448638d89dad165c0594c (patch)
tree4d8db6fda07659296e0da4aedaacfb1df50d3326 /test
parent5ee157cd1184e34209d840947c3595864da891b4 (diff)
parente4ce826e3009bf0de85225fef53fae330e4496ff (diff)
Merge github.com:grpc/grpc into backoff_lib
Diffstat (limited to 'test')
-rw-r--r--test/core/census/mlog_test.c6
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py13
-rw-r--r--test/core/iomgr/timer_heap_test.c10
-rw-r--r--test/core/iomgr/udp_server_test.c22
-rw-r--r--test/core/support/load_file_test.c14
-rw-r--r--test/core/util/port_posix.c19
-rw-r--r--test/core/util/test_config.c149
-rw-r--r--test/cpp/codegen/codegen_test.cc49
-rw-r--r--test/cpp/interop/reconnect_interop_server.cc12
9 files changed, 226 insertions, 68 deletions
diff --git a/test/core/census/mlog_test.c b/test/core/census/mlog_test.c
index 5b6c5946ab..000ac7335a 100644
--- a/test/core/census/mlog_test.c
+++ b/test/core/census/mlog_test.c
@@ -332,7 +332,7 @@ static void multiple_writers_single_reader(int circular_log) {
static void setup_test(int circular_log) {
census_log_initialize(LOG_SIZE_IN_MB, circular_log);
- GPR_ASSERT(census_log_remaining_space() == LOG_SIZE_IN_BYTES);
+ // GPR_ASSERT(census_log_remaining_space() == LOG_SIZE_IN_BYTES);
}
// Attempts to create a record of invalid size (size >
@@ -352,8 +352,8 @@ void test_invalid_record_size(void) {
// check can fail if the thread is context switched to a new CPU during the
// start_write execution (multiple blocks get allocated), but this has not
// been observed in practice.
- GPR_ASSERT(LOG_SIZE_IN_BYTES - CENSUS_LOG_MAX_RECORD_SIZE ==
- census_log_remaining_space());
+ // GPR_ASSERT(LOG_SIZE_IN_BYTES - CENSUS_LOG_MAX_RECORD_SIZE ==
+ // census_log_remaining_space());
census_log_shutdown();
}
diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py
index 4dfafcea24..549120f2bb 100755
--- a/test/core/end2end/gen_build_yaml.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -150,7 +150,6 @@ def without(l, e):
def main():
sec_deps = [
- 'end2end_certs',
'grpc_test_util',
'grpc',
'gpr_test_util',
@@ -193,18 +192,6 @@ def main():
'deps': unsec_deps,
'vs_proj_dir': 'test/end2end/tests',
}
- ] + [
- {
- 'name': 'end2end_certs',
- 'build': 'private',
- 'language': 'c',
- 'src': [
- "test/core/end2end/data/test_root_cert.c",
- "test/core/end2end/data/server1_cert.c",
- "test/core/end2end/data/server1_key.c"
- ],
- 'vs_proj_dir': 'test/end2end',
- }
],
'targets': [
{
diff --git a/test/core/iomgr/timer_heap_test.c b/test/core/iomgr/timer_heap_test.c
index cd34696f7d..dd23a99520 100644
--- a/test/core/iomgr/timer_heap_test.c
+++ b/test/core/iomgr/timer_heap_test.c
@@ -177,11 +177,12 @@ static void test2(void) {
grpc_timer_heap pq;
- elem_struct elems[1000];
+ static const size_t elems_size = 1000;
+ elem_struct *elems = gpr_malloc(elems_size * sizeof(elem_struct));
size_t num_inserted = 0;
grpc_timer_heap_init(&pq);
- memset(elems, 0, sizeof(elems));
+ memset(elems, 0, elems_size);
for (size_t round = 0; round < 10000; round++) {
int r = rand() % 1000;
@@ -209,7 +210,7 @@ static void test2(void) {
if (num_inserted > 0) {
grpc_timer *top = grpc_timer_heap_top(&pq);
grpc_timer_heap_pop(&pq);
- for (size_t i = 0; i < GPR_ARRAY_SIZE(elems); i++) {
+ for (size_t i = 0; i < elems_size; i++) {
if (top == &elems[i].elem) {
GPR_ASSERT(elems[i].inserted);
elems[i].inserted = false;
@@ -222,7 +223,7 @@ static void test2(void) {
if (num_inserted) {
gpr_timespec *min_deadline = NULL;
- for (size_t i = 0; i < GPR_ARRAY_SIZE(elems); i++) {
+ for (size_t i = 0; i < elems_size; i++) {
if (elems[i].inserted) {
if (min_deadline == NULL) {
min_deadline = &elems[i].elem.deadline;
@@ -239,6 +240,7 @@ static void test2(void) {
}
grpc_timer_heap_destroy(&pq);
+ gpr_free(elems);
}
static void shrink_test(void) {
diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c
index 2e253d8a8a..ce3c23b4bf 100644
--- a/test/core/iomgr/udp_server_test.c
+++ b/test/core/iomgr/udp_server_test.c
@@ -31,8 +31,9 @@
*
*/
-#include "src/core/iomgr/udp_server.h"
#include "src/core/iomgr/iomgr.h"
+#include "src/core/iomgr/pollset_posix.h"
+#include "src/core/iomgr/udp_server.h"
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
@@ -48,6 +49,7 @@
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", #x)
static grpc_pollset g_pollset;
+static gpr_mu *g_mu;
static int g_number_of_reads = 0;
static int g_number_of_bytes_read = 0;
@@ -56,14 +58,14 @@ static void on_read(grpc_exec_ctx *exec_ctx, grpc_fd *emfd,
char read_buffer[512];
ssize_t byte_count;
- gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset));
+ gpr_mu_lock(g_mu);
byte_count = recv(emfd->fd, read_buffer, sizeof(read_buffer), 0);
g_number_of_reads++;
g_number_of_bytes_read += (int)byte_count;
grpc_pollset_kick(&g_pollset, NULL);
- gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset));
+ gpr_mu_unlock(g_mu);
}
static void test_no_op(void) {
@@ -142,7 +144,7 @@ static void test_receive(int number_of_clients) {
pollsets[0] = &g_pollset;
grpc_udp_server_start(&exec_ctx, s, pollsets, 1, NULL);
- gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset));
+ gpr_mu_lock(g_mu);
for (i = 0; i < number_of_clients; i++) {
deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
@@ -155,19 +157,19 @@ static void test_receive(int number_of_clients) {
GPR_ASSERT(5 == write(clifd, "hello", 5));
while (g_number_of_reads == number_of_reads_before &&
gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) {
- grpc_pollset_worker worker;
+ grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, &g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset));
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset));
+ gpr_mu_lock(g_mu);
}
GPR_ASSERT(g_number_of_reads == number_of_reads_before + 1);
close(clifd);
}
GPR_ASSERT(g_number_of_bytes_read == 5 * number_of_clients);
- gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset));
+ gpr_mu_unlock(g_mu);
grpc_udp_server_destroy(&exec_ctx, s, NULL);
grpc_exec_ctx_finish(&exec_ctx);
@@ -181,8 +183,8 @@ int main(int argc, char **argv) {
grpc_closure destroyed;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
- grpc_iomgr_init();
- grpc_pollset_init(&g_pollset);
+ grpc_init();
+ grpc_pollset_init(&g_pollset, &g_mu);
test_no_op();
test_no_op_with_start();
diff --git a/test/core/support/load_file_test.c b/test/core/support/load_file_test.c
index e6ba617440..70189b739d 100644
--- a/test/core/support/load_file_test.c
+++ b/test/core/support/load_file_test.c
@@ -135,33 +135,33 @@ static void test_load_big_file(void) {
gpr_slice slice;
int success;
char *tmp_name;
- unsigned char buffer[124631];
+ static const size_t buffer_size = 124631;
+ unsigned char *buffer = gpr_malloc(buffer_size);
unsigned char *current;
size_t i;
LOG_TEST_NAME("test_load_big_file");
- for (i = 0; i < sizeof(buffer); i++) {
- buffer[i] = 42;
- }
+ memset(buffer, 42, buffer_size);
tmp = gpr_tmpfile(prefix, &tmp_name);
GPR_ASSERT(tmp != NULL);
GPR_ASSERT(tmp_name != NULL);
- GPR_ASSERT(fwrite(buffer, 1, sizeof(buffer), tmp) == sizeof(buffer));
+ GPR_ASSERT(fwrite(buffer, 1, buffer_size, tmp) == buffer_size);
fclose(tmp);
slice = gpr_load_file(tmp_name, 0, &success);
GPR_ASSERT(success == 1);
- GPR_ASSERT(GPR_SLICE_LENGTH(slice) == sizeof(buffer));
+ GPR_ASSERT(GPR_SLICE_LENGTH(slice) == buffer_size);
current = GPR_SLICE_START_PTR(slice);
- for (i = 0; i < sizeof(buffer); i++) {
+ for (i = 0; i < buffer_size; i++) {
GPR_ASSERT(current[i] == 42);
}
remove(tmp_name);
gpr_free(tmp_name);
gpr_slice_unref(slice);
+ gpr_free(buffer);
}
int main(int argc, char **argv) {
diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c
index ba382d242a..c4bd00c1ba 100644
--- a/test/core/util/port_posix.c
+++ b/test/core/util/port_posix.c
@@ -77,6 +77,7 @@ typedef struct freereq {
static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p,
bool success) {
grpc_pollset_destroy(p);
+ gpr_free(p);
grpc_shutdown();
}
@@ -95,7 +96,7 @@ static void free_port_using_server(char *server, int port) {
freereq pr;
char *path;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_closure shutdown_closure;
+ grpc_closure *shutdown_closure;
grpc_init();
@@ -104,8 +105,8 @@ static void free_port_using_server(char *server, int port) {
pr.pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(pr.pollset, &pr.mu);
- grpc_closure_init(&shutdown_closure, destroy_pollset_and_shutdown,
- pr.pollset);
+ shutdown_closure =
+ grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset);
req.host = server;
gpr_asprintf(&path, "/drop/%d", port);
@@ -126,9 +127,8 @@ static void free_port_using_server(char *server, int port) {
grpc_httpcli_context_destroy(&context);
grpc_exec_ctx_finish(&exec_ctx);
- grpc_pollset_shutdown(&exec_ctx, pr.pollset, &shutdown_closure);
+ grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_free(pr.pollset);
gpr_free(path);
}
@@ -262,7 +262,7 @@ static int pick_port_using_server(char *server) {
grpc_httpcli_request req;
portreq pr;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_closure shutdown_closure;
+ grpc_closure *shutdown_closure;
grpc_init();
@@ -270,8 +270,8 @@ static int pick_port_using_server(char *server) {
memset(&req, 0, sizeof(req));
pr.pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(pr.pollset, &pr.mu);
- grpc_closure_init(&shutdown_closure, destroy_pollset_and_shutdown,
- pr.pollset);
+ shutdown_closure =
+ grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset);
pr.port = -1;
pr.server = server;
pr.ctx = &context;
@@ -294,9 +294,8 @@ static int pick_port_using_server(char *server) {
gpr_mu_unlock(pr.mu);
grpc_httpcli_context_destroy(&context);
- grpc_pollset_shutdown(&exec_ctx, pr.pollset, &shutdown_closure);
+ grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_free(pr.pollset);
return pr.port;
}
diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c
index 14bfc957cb..bf672e8f67 100644
--- a/test/core/util/test_config.c
+++ b/test/core/util/test_config.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,11 +33,13 @@
#include "test/core/util/test_config.h"
-#include <grpc/support/port_platform.h>
#include <grpc/support/log.h>
-#include "src/core/support/string.h"
-#include <stdlib.h>
+#include <grpc/support/port_platform.h>
#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "src/core/support/string.h"
double g_fixture_slowdown_factor = 1.0;
@@ -52,14 +54,125 @@ static unsigned seed(void) { return _getpid(); }
#endif
#if GPR_WINDOWS_CRASH_HANDLER
-LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) {
- gpr_log(GPR_DEBUG, "Exception handler called, dumping information");
- while (ex_info->ExceptionRecord) {
- DWORD code = ex_info->ExceptionRecord->ExceptionCode;
- DWORD flgs = ex_info->ExceptionRecord->ExceptionFlags;
- PVOID addr = ex_info->ExceptionRecord->ExceptionAddress;
- gpr_log("code: %x - flags: %d - address: %p", code, flgs, addr);
- ex_info->ExceptionRecord = ex_info->ExceptionRecord->ExceptionRecord;
+#include <windows.h>
+
+#include <tchar.h>
+
+// disable warning 4091 - dbghelp.h is broken for msvc2015
+#pragma warning(disable : 4091)
+#define DBGHELP_TRANSLATE_TCHAR
+#include <dbghelp.h>
+
+#ifdef _MSC_VER
+#pragma comment(lib, "dbghelp.lib")
+#endif
+
+static void print_current_stack() {
+ typedef USHORT(WINAPI * CaptureStackBackTraceType)(
+ __in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG);
+ CaptureStackBackTraceType func = (CaptureStackBackTraceType)(GetProcAddress(
+ LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace"));
+
+ if (func == NULL) return; // WOE 29.SEP.2010
+
+// Quote from Microsoft Documentation:
+// ## Windows Server 2003 and Windows XP:
+// ## The sum of the FramesToSkip and FramesToCapture parameters must be less
+// than 63.
+#define MAX_CALLERS 62
+
+ void *callers_stack[MAX_CALLERS];
+ unsigned short frames;
+ SYMBOL_INFOW *symbol;
+ HANDLE process;
+ process = GetCurrentProcess();
+ SymInitialize(process, NULL, TRUE);
+ frames = (func)(0, MAX_CALLERS, callers_stack, NULL);
+ symbol =
+ (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1);
+ symbol->MaxNameLen = 255;
+ symbol->SizeOfStruct = sizeof(SYMBOL_INFOW);
+
+ const unsigned short MAX_CALLERS_SHOWN = 32;
+ frames = frames < MAX_CALLERS_SHOWN ? frames : MAX_CALLERS_SHOWN;
+ for (unsigned int i = 0; i < frames; i++) {
+ SymFromAddrW(process, (DWORD64)(callers_stack[i]), 0, symbol);
+ fwprintf(stderr, L"*** %d: %016I64X %ls - %016I64X\n", i,
+ (DWORD64)callers_stack[i], symbol->Name, (DWORD64)symbol->Address);
+ }
+
+ free(symbol);
+}
+
+static void print_stack_from_context(CONTEXT c) {
+ STACKFRAME s; // in/out stackframe
+ memset(&s, 0, sizeof(s));
+ DWORD imageType;
+#ifdef _M_IX86
+ // normally, call ImageNtHeader() and use machine info from PE header
+ imageType = IMAGE_FILE_MACHINE_I386;
+ s.AddrPC.Offset = c.Eip;
+ s.AddrPC.Mode = AddrModeFlat;
+ s.AddrFrame.Offset = c.Ebp;
+ s.AddrFrame.Mode = AddrModeFlat;
+ s.AddrStack.Offset = c.Esp;
+ s.AddrStack.Mode = AddrModeFlat;
+#elif _M_X64
+ imageType = IMAGE_FILE_MACHINE_AMD64;
+ s.AddrPC.Offset = c.Rip;
+ s.AddrPC.Mode = AddrModeFlat;
+ s.AddrFrame.Offset = c.Rsp;
+ s.AddrFrame.Mode = AddrModeFlat;
+ s.AddrStack.Offset = c.Rsp;
+ s.AddrStack.Mode = AddrModeFlat;
+#elif _M_IA64
+ imageType = IMAGE_FILE_MACHINE_IA64;
+ s.AddrPC.Offset = c.StIIP;
+ s.AddrPC.Mode = AddrModeFlat;
+ s.AddrFrame.Offset = c.IntSp;
+ s.AddrFrame.Mode = AddrModeFlat;
+ s.AddrBStore.Offset = c.RsBSP;
+ s.AddrBStore.Mode = AddrModeFlat;
+ s.AddrStack.Offset = c.IntSp;
+ s.AddrStack.Mode = AddrModeFlat;
+#else
+#error "Platform not supported!"
+#endif
+
+ HANDLE process = GetCurrentProcess();
+ HANDLE thread = GetCurrentThread();
+
+ SYMBOL_INFOW *symbol =
+ (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1);
+ symbol->MaxNameLen = 255;
+ symbol->SizeOfStruct = sizeof(SYMBOL_INFOW);
+
+ while (StackWalk(imageType, process, thread, &s, &c, 0,
+ SymFunctionTableAccess, SymGetModuleBase, 0)) {
+ BOOL has_symbol =
+ SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol);
+ fwprintf(
+ stderr, L"*** %016I64X %ls - %016I64X\n", (DWORD64)(s.AddrPC.Offset),
+ has_symbol ? symbol->Name : L"<<no symbol>>", (DWORD64)symbol->Address);
+ }
+
+ free(symbol);
+}
+
+static LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) {
+ fprintf(stderr, "Exception handler called, dumping information\n");
+ bool try_to_print_stack = true;
+ PEXCEPTION_RECORD exrec = ex_info->ExceptionRecord;
+ while (exrec) {
+ DWORD code = exrec->ExceptionCode;
+ DWORD flgs = exrec->ExceptionFlags;
+ PVOID addr = exrec->ExceptionAddress;
+ if (code == EXCEPTION_STACK_OVERFLOW) try_to_print_stack = false;
+ fprintf(stderr, "code: %x - flags: %d - address: %p\n", code, flgs, addr);
+ exrec = exrec->ExceptionRecord;
+ }
+ if (try_to_print_stack) {
+ print_stack_from_context(*ex_info->ContextRecord);
}
if (IsDebuggerPresent()) {
__debugbreak();
@@ -69,8 +182,9 @@ LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) {
return EXCEPTION_EXECUTE_HANDLER;
}
-void abort_handler(int sig) {
- gpr_log(GPR_DEBUG, "Abort handler called.");
+static void abort_handler(int sig) {
+ fprintf(stderr, "Abort handler called.\n");
+ print_current_stack(NULL);
if (IsDebuggerPresent()) {
__debugbreak();
} else {
@@ -79,17 +193,20 @@ void abort_handler(int sig) {
}
static void install_crash_handler() {
+ if (!SymInitialize(GetCurrentProcess(), NULL, TRUE)) {
+ fprintf(stderr, "SymInitialize failed: %d\n", GetLastError());
+ }
SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)crash_handler);
_set_abort_behavior(0, _WRITE_ABORT_MSG);
_set_abort_behavior(0, _CALL_REPORTFAULT);
signal(SIGABRT, abort_handler);
}
#elif GPR_POSIX_CRASH_HANDLER
+#include <errno.h>
#include <execinfo.h>
+#include <grpc/support/useful.h>
#include <stdio.h>
#include <string.h>
-#include <grpc/support/useful.h>
-#include <errno.h>
static char g_alt_stack[MINSIGSTKSZ];
diff --git a/test/cpp/codegen/codegen_test.cc b/test/cpp/codegen/codegen_test.cc
new file mode 100644
index 0000000000..735755a5d0
--- /dev/null
+++ b/test/cpp/codegen/codegen_test.cc
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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 <gtest/gtest.h>
+
+namespace grpc {
+namespace {
+
+class CodegenTest : public ::testing::Test {};
+
+TEST_F(CodegenTest, Build) {}
+
+} // namespace
+} // namespace grpc
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc
index 3602b8c2b0..1f9147d0ef 100644
--- a/test/cpp/interop/reconnect_interop_server.cc
+++ b/test/cpp/interop/reconnect_interop_server.cc
@@ -31,6 +31,8 @@
*
*/
+// Test description at doc/connection-backoff-interop-test-description.md
+
#include <signal.h>
#include <unistd.h>
@@ -40,17 +42,17 @@
#include <sstream>
#include <gflags/gflags.h>
-#include <grpc/grpc.h>
-#include <grpc/support/log.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
+#include <grpc/grpc.h>
+#include <grpc/support/log.h>
-#include "test/core/util/reconnect_server.h"
-#include "test/cpp/util/test_config.h"
-#include "src/proto/grpc/testing/test.grpc.pb.h"
#include "src/proto/grpc/testing/empty.grpc.pb.h"
#include "src/proto/grpc/testing/messages.grpc.pb.h"
+#include "src/proto/grpc/testing/test.grpc.pb.h"
+#include "test/core/util/reconnect_server.h"
+#include "test/cpp/util/test_config.h"
DEFINE_int32(control_port, 0, "Server port for controlling the server.");
DEFINE_int32(retry_port, 0,