aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
Diffstat (limited to 'test/core')
-rw-r--r--test/core/bad_client/bad_client.c4
-rw-r--r--test/core/channel/channel_stack_test.c2
-rw-r--r--test/core/transport/chttp2/hpack_encoder_test.c2
-rw-r--r--test/core/transport/chttp2/hpack_parser_test.c2
-rw-r--r--test/core/transport/chttp2/hpack_table_test.c6
-rw-r--r--test/core/transport/metadata_test.c2
6 files changed, 16 insertions, 2 deletions
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c
index ed46e7b009..fb2cd2d85b 100644
--- a/test/core/bad_client/bad_client.c
+++ b/test/core/bad_client/bad_client.c
@@ -84,7 +84,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
gpr_thd_id id;
char *hex;
grpc_transport *transport;
- grpc_mdctx *mdctx = grpc_mdctx_create();
+ grpc_mdctx *mdctx;
gpr_slice slice =
gpr_slice_from_copied_buffer(client_payload, client_payload_length);
gpr_slice_buffer outgoing;
@@ -102,6 +102,8 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
/* Init grpc */
grpc_init();
+ mdctx = grpc_mdctx_create();
+
/* Create endpoints */
sfd = grpc_iomgr_create_endpoint_pair("fixture", 65536);
diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c
index 5e1ba11857..08550b4934 100644
--- a/test/core/channel/channel_stack_test.c
+++ b/test/core/channel/channel_stack_test.c
@@ -140,6 +140,8 @@ static void test_create_channel_stack(void) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
+ grpc_init();
test_create_channel_stack();
+ grpc_shutdown();
return 0;
}
diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c
index 6553e0da20..30cb6c1d17 100644
--- a/test/core/transport/chttp2/hpack_encoder_test.c
+++ b/test/core/transport/chttp2/hpack_encoder_test.c
@@ -191,8 +191,10 @@ static void run_test(void (*test)(), const char *name) {
int main(int argc, char **argv) {
size_t i;
grpc_test_init(argc, argv);
+ grpc_init();
TEST(test_basic_headers);
TEST(test_decode_table_overflow);
+ grpc_shutdown();
for (i = 0; i < num_to_delete; i++) {
gpr_free(to_delete[i]);
}
diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c
index 3a313375a4..4e52b0e466 100644
--- a/test/core/transport/chttp2/hpack_parser_test.c
+++ b/test/core/transport/chttp2/hpack_parser_test.c
@@ -217,7 +217,9 @@ static void test_vectors(grpc_slice_split_mode mode) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
+ grpc_init();
test_vectors(GRPC_SLICE_SPLIT_MERGE_ALL);
test_vectors(GRPC_SLICE_SPLIT_ONE_BYTE);
+ grpc_shutdown();
return 0;
}
diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c
index aa3e273a6c..adc69bf314 100644
--- a/test/core/transport/chttp2/hpack_table_test.c
+++ b/test/core/transport/chttp2/hpack_table_test.c
@@ -36,10 +36,12 @@
#include <string.h>
#include <stdio.h>
-#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+#include <grpc/grpc.h>
+
+#include "src/core/support/string.h"
#include "test/core/util/test_config.h"
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
@@ -268,8 +270,10 @@ static void test_find(void) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
+ grpc_init();
test_static_lookup();
test_many_additions();
test_find();
+ grpc_shutdown();
return 0;
}
diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c
index 080e86cb63..fc9c93a774 100644
--- a/test/core/transport/metadata_test.c
+++ b/test/core/transport/metadata_test.c
@@ -270,6 +270,7 @@ static void test_base64_and_huffman_works(void) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
+ grpc_init();
test_no_op();
test_create_string();
test_create_metadata();
@@ -279,5 +280,6 @@ int main(int argc, char **argv) {
test_things_stick_around();
test_slices_work();
test_base64_and_huffman_works();
+ grpc_shutdown();
return 0;
}