static void run_test(void (*test)(), const char *name) { gpr_log(GPR_INFO, "RUN TEST: %s", name); g_mdctx = grpc_mdctx_create_with_seed(0); grpc_chttp2_hpack_compressor_init(&g_compressor, g_mdctx); grpc_sopb_init(&g_sopb); test(); grpc_chttp2_hpack_compressor_destroy(&g_compressor); grpc_mdctx_unref(g_mdctx); grpc_sopb_destroy(&g_sopb); }
grpc_mdctx *grpc_mdctx_create(void) { /* This seed is used to prevent remote connections from controlling hash table * collisions. It needs to be somewhat unpredictable to a remote connection. */ return grpc_mdctx_create_with_seed(gpr_now().tv_nsec); }