pull/11873/head
Craig Tiller 8 years ago
parent a0116f36ec
commit 413e95b8ed
  1. 6
      test/core/iomgr/fd_posix_test.c
  2. 7
      test/core/iomgr/resolve_address_posix_test.c

@ -35,6 +35,7 @@
#include <sys/time.h>
#include <unistd.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
@ -530,8 +531,7 @@ 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(&exec_ctx);
grpc_iomgr_start(&exec_ctx);
grpc_init();
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
test_grpc_fd();
@ -541,8 +541,8 @@ int main(int argc, char **argv) {
grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
grpc_exec_ctx_flush(&exec_ctx);
gpr_free(g_pollset);
grpc_iomgr_shutdown(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
return 0;
}

@ -21,12 +21,14 @@
#include <string.h>
#include <sys/un.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "test/core/util/test_config.h"
@ -159,13 +161,12 @@ static void test_unix_socket_path_name_too_long(void) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_iomgr_init(&exec_ctx);
grpc_iomgr_start(&exec_ctx);
test_unix_socket();
test_unix_socket_path_name_too_long();
grpc_executor_shutdown(&exec_ctx);
grpc_iomgr_shutdown(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
return 0;
}

Loading…
Cancel
Save