mirror of https://github.com/grpc/grpc.git
[threading] Implement thready-tsan mode (#33193)
This test mode tries to create threads wherever it legally can to maximize the chances of TSAN finding errors in our codebase. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> --------- Co-authored-by: ctiller <ctiller@users.noreply.github.com>pull/33270/head
parent
d39a379232
commit
338c55978b
24 changed files with 178 additions and 49 deletions
@ -1,33 +0,0 @@ |
|||||||
# Copyright 2023 gRPC authors. |
|
||||||
# |
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
||||||
# you may not use this file except in compliance with the License. |
|
||||||
# You may obtain a copy of the License at |
|
||||||
# |
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0 |
|
||||||
# |
|
||||||
# Unless required by applicable law or agreed to in writing, software |
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, |
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
||||||
# See the License for the specific language governing permissions and |
|
||||||
# limitations under the License. |
|
||||||
|
|
||||||
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_package") |
|
||||||
|
|
||||||
licenses(["notice"]) |
|
||||||
|
|
||||||
grpc_package( |
|
||||||
name = "test/core/event_engine/thready_event_engine", |
|
||||||
visibility = "tests", |
|
||||||
) |
|
||||||
|
|
||||||
grpc_cc_library( |
|
||||||
name = "thready_event_engine", |
|
||||||
srcs = ["thready_event_engine.cc"], |
|
||||||
hdrs = ["thready_event_engine.h"], |
|
||||||
deps = [ |
|
||||||
"//:event_engine_base_hdrs", |
|
||||||
"//src/core:default_event_engine", |
|
||||||
"//src/core:time", |
|
||||||
], |
|
||||||
) |
|
@ -0,0 +1,46 @@ |
|||||||
|
# Copyright 2019 The gRPC Authors |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
# Config file for the internal CI (in protobuf text format) |
||||||
|
|
||||||
|
# Location of the continuous shell script in repository. |
||||||
|
build_file: "grpc/tools/internal_ci/linux/grpc_bazel_rbe.sh" |
||||||
|
timeout_mins: 90 |
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "**/*sponge_log.*" |
||||||
|
regex: "github/grpc/reports/**" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key" |
||||||
|
|
||||||
|
bazel_setting { |
||||||
|
# In order for Kokoro to recognize this as a bazel build and publish the bazel resultstore link, |
||||||
|
# the bazel_setting section needs to be present and "upsalite_frontend_address" needs to be |
||||||
|
# set. The rest of configuration from bazel_setting is unused (we configure everything when bazel |
||||||
|
# command is invoked). |
||||||
|
upsalite_frontend_address: "https://source.cloud.google.com" |
||||||
|
} |
||||||
|
|
||||||
|
env_vars { |
||||||
|
# flags will be passed to bazel invocation |
||||||
|
key: "BAZEL_FLAGS" |
||||||
|
value: "--cache_test_results=no --config=thready_tsan" |
||||||
|
} |
||||||
|
|
||||||
|
env_vars { |
||||||
|
key: "UPLOAD_TEST_RESULTS" |
||||||
|
value: "true" |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
# Copyright 2019 The gRPC Authors |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
# Config file for the internal CI (in protobuf text format) |
||||||
|
|
||||||
|
# Location of the continuous shell script in repository. |
||||||
|
build_file: "grpc/tools/internal_ci/linux/grpc_bazel_rbe.sh" |
||||||
|
timeout_mins: 90 |
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "**/*sponge_log.*" |
||||||
|
regex: "github/grpc/reports/**" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key" |
||||||
|
|
||||||
|
bazel_setting { |
||||||
|
# In order for Kokoro to recognize this as a bazel build and publish the bazel resultstore link, |
||||||
|
# the bazel_setting section needs to be present and "upsalite_frontend_address" needs to be |
||||||
|
# set. The rest of configuration from bazel_setting is unused (we configure everything when bazel |
||||||
|
# command is invoked). |
||||||
|
upsalite_frontend_address: "https://source.cloud.google.com" |
||||||
|
} |
||||||
|
|
||||||
|
env_vars { |
||||||
|
# flags will be passed to bazel invocation |
||||||
|
key: "BAZEL_FLAGS" |
||||||
|
value: "--config=thready_tsan" |
||||||
|
} |
Loading…
Reference in new issue