Merge pull request #15785 from adelez/suppressions

Add suppressions to bazel TSAN build (take 2)
reviewable/pr15196/r14^2
adelez 7 years ago committed by GitHub
commit 8c39827583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      bazel/grpc_build_system.bzl
  2. 8
      build.yaml
  3. 1
      test/core/channel/BUILD
  4. 4
      test/core/security/BUILD
  5. 1
      test/core/transport/BUILD
  6. 1
      test/core/tsi/alts/crypt/BUILD
  7. 4
      test/core/tsi/alts/frame_protector/BUILD
  8. 5
      test/core/tsi/alts/handshaker/BUILD
  9. 3
      test/core/tsi/alts/zero_copy_frame_protector/BUILD
  10. 5
      test/core/util/BUILD
  11. 0
      test/core/util/lsan_suppressions.txt
  12. 0
      test/core/util/tsan_suppressions.txt
  13. 0
      test/core/util/ubsan_suppressions.txt
  14. 1
      test/cpp/client/BUILD
  15. 1
      test/cpp/microbenchmarks/BUILD
  16. 2
      test/cpp/util/BUILD
  17. 6
      tools/bazel.rc
  18. 2
      tools/internal_ci/linux/grpc_tsan_on_foundry.sh
  19. 8
      tools/run_tests/generated/configs.json

@ -60,7 +60,7 @@ def _maybe_update_cc_library_hdrs(hdrs):
def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
external_deps = [], deps = [], standalone = False,
language = "C++", testonly = False, visibility = None,
alwayslink = 0):
alwayslink = 0, data = []):
copts = []
if language.upper() == "C":
copts = if_not_windows(["-std=c99"])
@ -85,6 +85,7 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
"include"
],
alwayslink = alwayslink,
data = data,
)
def grpc_proto_plugin(name, srcs = [], deps = []):

@ -5494,7 +5494,7 @@ configs:
compile_the_world: true
test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
asan-noleaks:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer
@ -5518,7 +5518,7 @@ configs:
compile_the_world: true
test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
basicprof:
CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
DEFINES: NDEBUG
@ -5592,7 +5592,7 @@ configs:
LDXX: clang++
compile_the_world: true
test_environ:
TSAN_OPTIONS: suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
ubsan:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined -fno-omit-frame-pointer
@ -5604,7 +5604,7 @@ configs:
LDXX: clang++
compile_the_world: true
test_environ:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=tools/ubsan_suppressions.txt
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
defaults:
ares:
CFLAGS: -Wno-sign-conversion $(if $(subst Darwin,,$(SYSTEM)),,-Wno-shorten-64-to-32)

@ -105,6 +105,7 @@ grpc_cc_test(
language = "C++",
deps = [
"//:grpc",
"//test/core/util:gpr_test_util",
],
external_deps = [
"gtest",

@ -183,6 +183,7 @@ grpc_cc_test(
"//:gpr",
"//:gpr_base",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)
@ -195,6 +196,7 @@ grpc_cc_test(
"//:gpr",
"//:gpr_base",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)
@ -206,6 +208,7 @@ grpc_cc_test(
"//:alts_util",
"//:gpr",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)
@ -220,5 +223,6 @@ grpc_cc_test(
"//:grpc_secure",
"//:tsi",
"//:tsi_interface",
"//test/core/util:gpr_test_util",
],
)

@ -129,6 +129,7 @@ grpc_cc_test(
language = "C++",
deps = [
"//:grpc",
"//test/core/util:gpr_test_util",
],
external_deps = [
"gtest",

@ -27,6 +27,7 @@ grpc_cc_test(
"//:alts_frame_protector",
"//:gpr",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)

@ -27,6 +27,7 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/util:gpr_test_util",
],
)
@ -39,6 +40,7 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/util:gpr_test_util",
],
)
@ -54,6 +56,7 @@ grpc_cc_test(
"//:tsi_interface",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/tsi:transport_security_test_lib",
"//test/core/util:gpr_test_util",
],
)
@ -67,5 +70,6 @@ grpc_cc_test(
"//:gpr_base",
"//:grpc",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/util:gpr_test_util",
],
)

@ -37,6 +37,7 @@ grpc_cc_test(
"//:tsi",
"//:tsi_interface",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)
@ -47,6 +48,7 @@ grpc_cc_test(
deps = [
":alts_handshaker_service_api_test_lib",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)
@ -60,6 +62,7 @@ grpc_cc_test(
"//:gpr_base",
"//:grpc",
"//:tsi",
"//test/core/util:gpr_test_util",
],
)
@ -71,6 +74,7 @@ grpc_cc_test(
":alts_handshaker_service_api_test_lib",
"//:grpc",
"//:tsi",
"//test/core/util:gpr_test_util",
],
)
@ -81,6 +85,7 @@ grpc_cc_test(
deps = [
"//:alts_util",
"//:grpc",
"//test/core/util:gpr_test_util",
],
)

@ -28,6 +28,7 @@ grpc_cc_test(
"//:grpc",
"//:grpc_base_c",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/util:gpr_test_util",
],
)
@ -40,6 +41,7 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/util:gpr_test_util",
],
)
@ -53,5 +55,6 @@ grpc_cc_test(
"//:grpc",
"//:grpc_base_c",
"//test/core/tsi/alts/crypt:alts_crypt_test_util",
"//test/core/util:gpr_test_util",
],
)

@ -32,6 +32,11 @@ grpc_cc_library(
"test_config.h",
],
deps = ["//:gpr"],
data = [
"lsan_suppressions.txt",
"tsan_suppressions.txt",
"ubsan_suppressions.txt",
],
)
grpc_cc_library(

@ -28,6 +28,7 @@ grpc_cc_test(
"//:gpr",
"//:grpc",
"//:grpc++",
"//test/core/util:gpr_test_util",
],
)

@ -24,6 +24,7 @@ grpc_cc_test(
external_deps = [
"benchmark",
],
deps = ["//test/core/util:gpr_test_util",]
)
grpc_cc_library(

@ -217,6 +217,7 @@ grpc_cc_test(
],
deps = [
"//:grpc++",
"//test/core/util:gpr_test_util",
],
)
@ -260,6 +261,7 @@ grpc_cc_test(
deps = [
"//:grpc++_error_details",
"//src/proto/grpc/testing:echo_messages_proto",
"//test/core/util:gpr_test_util",
],
)

@ -11,7 +11,7 @@ build:asan --copt -fno-omit-frame-pointer
build:asan --copt -DGPR_NO_DIRECT_SYSCALLS
build:asan --linkopt -fsanitize=address
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
build:asan --action_env=LSAN_OPTIONS=suppressions=lsan_suppressions.txt:report_objects=1
build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
build:msan --strip=never
build:msan --copt -fsanitize-coverage=edge
@ -32,7 +32,7 @@ build:tsan --copt -fno-omit-frame-pointer
build:tsan --copt -DGPR_NO_DIRECT_SYSCALLS
build:tsan --copt -DGRPC_TSAN
build:tsan --linkopt -fsanitize=thread
build:tsan --action_env=TSAN_OPTIONS=suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
build:tsan --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
build:ubsan --strip=never
build:ubsan --copt -fsanitize-coverage=edge
@ -42,7 +42,7 @@ build:ubsan --copt -DGRPC_UBSAN
build:ubsan --copt -DNDEBUG
build:ubsan --copt -fno-sanitize=function,vptr
build:ubsan --linkopt -fsanitize=undefined
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=tools/ubsan_suppressions.txt
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
build:basicprof --strip=never
build:basicprof --copt -DNDEBUG

@ -14,5 +14,5 @@
# limitations under the License.
export UPLOAD_TEST_RESULTS=true
EXTRA_FLAGS="--copt=-gmlt --strip=never --copt=-fsanitize=thread --linkopt=-fsanitize=thread --test_timeout=3600"
EXTRA_FLAGS="--copt=-gmlt --strip=never --copt=-fsanitize=thread --linkopt=-fsanitize=thread --test_timeout=3600 --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1"
github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}"

@ -6,7 +6,7 @@
"config": "asan-trace-cmp",
"environ": {
"ASAN_OPTIONS": "detect_leaks=1:color=always",
"LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1"
"LSAN_OPTIONS": "suppressions=test/core/util/lsan_suppressions.txt:report_objects=1"
}
},
{
@ -16,7 +16,7 @@
"config": "asan",
"environ": {
"ASAN_OPTIONS": "detect_leaks=1:color=always",
"LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1"
"LSAN_OPTIONS": "suppressions=test/core/util/lsan_suppressions.txt:report_objects=1"
}
},
{
@ -47,13 +47,13 @@
{
"config": "ubsan",
"environ": {
"UBSAN_OPTIONS": "halt_on_error=1:print_stacktrace=1:suppressions=tools/ubsan_suppressions.txt"
"UBSAN_OPTIONS": "halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt"
}
},
{
"config": "tsan",
"environ": {
"TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1"
"TSAN_OPTIONS": "suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1"
}
},
{

Loading…
Cancel
Save