avoid thread local unitialized problem under GRPC_PTHREAD_TLS

pull/20510/head
Jan Tattermusch 5 years ago
parent 5bb72e0a47
commit 78888d7861
  1. 3
      test/core/backoff/backoff_test.cc
  2. 3
      test/core/bad_client/tests/large_metadata.cc
  3. 2
      test/core/surface/byte_buffer_reader_test.cc
  4. 2
      test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc
  5. 2
      test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc
  6. 2
      test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc
  7. 5
      test/cpp/end2end/client_callback_end2end_test.cc

@ -21,6 +21,7 @@
#include <algorithm>
#include <grpc/support/log.h>
#include <grpc/grpc.h>
#include <gtest/gtest.h>
#include "test/core/util/test_config.h"
@ -171,7 +172,9 @@ TEST(BackOffTest, JitterBackOff) {
} // namespace grpc
int main(int argc, char** argv) {
grpc_init();
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
grpc_shutdown();
}

@ -140,7 +140,7 @@ static void server_verifier_sends_too_much_metadata(
int main(int argc, char** argv) {
int i;
grpc_init();
grpc::testing::TestEnvironment env(argc, argv);
// Test sending more metadata than the server will accept.
@ -173,5 +173,6 @@ int main(int argc, char** argv) {
GRPC_RUN_BAD_CLIENT_TEST(server_verifier_sends_too_much_metadata,
rst_stream_client_validator,
PFX_TOO_MUCH_METADATA_FROM_SERVER_STR, 0);
grpc_shutdown();
return 0;
}

@ -334,6 +334,7 @@ static void test_byte_buffer_copy(void) {
}
int main(int argc, char** argv) {
grpc_init();
grpc::testing::TestEnvironment env(argc, argv);
test_read_one_slice();
test_read_one_slice_malloc();
@ -347,5 +348,6 @@ int main(int argc, char** argv) {
test_byte_buffer_from_reader();
test_byte_buffer_copy();
test_readall();
grpc_shutdown();
return 0;
}

@ -68,7 +68,9 @@ static void deserialize_response_test() {
int main(int /*argc*/, char** /*argv*/) {
/* Tests. */
grpc_init();
deserialize_response_test();
convert_to_tsi_result_test();
grpc_shutdown();
return 0;
}

@ -445,6 +445,7 @@ static void alts_grpc_record_protocol_tests(
}
int main(int /*argc*/, char** /*argv*/) {
grpc_init();
alts_grpc_record_protocol_tests(
&test_fixture_integrity_only_no_rekey_no_extra_copy_create);
alts_grpc_record_protocol_tests(&test_fixture_integrity_only_rekey_create);
@ -453,6 +454,7 @@ int main(int /*argc*/, char** /*argv*/) {
alts_grpc_record_protocol_tests(
&test_fixture_privacy_integrity_no_rekey_create);
alts_grpc_record_protocol_tests(&test_fixture_privacy_integrity_rekey_create);
grpc_shutdown();
return 0;
}

@ -296,6 +296,7 @@ static void alts_zero_copy_protector_seal_unseal_large_buffer_tests(
}
int main(int /*argc*/, char** /*argv*/) {
grpc_init();
alts_zero_copy_protector_seal_unseal_small_buffer_tests(
/*enable_extra_copy=*/false);
alts_zero_copy_protector_seal_unseal_small_buffer_tests(
@ -304,5 +305,6 @@ int main(int /*argc*/, char** /*argv*/) {
/*enable_extra_copy=*/false);
alts_zero_copy_protector_seal_unseal_large_buffer_tests(
/*enable_extra_copy=*/true);
grpc_shutdown();
return 0;
}

@ -1386,7 +1386,10 @@ INSTANTIATE_TEST_SUITE_P(ClientCallbackEnd2endTest, ClientCallbackEnd2endTest,
} // namespace grpc
int main(int argc, char** argv) {
grpc_init();
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
int ret = RUN_ALL_TESTS();
grpc_shutdown();
return ret;
}

Loading…
Cancel
Save