Skip to content

Commit

Permalink
Switch to a tsan-instrumented libc++ for tsan tests (envoyproxy#12134)
Browse files Browse the repository at this point in the history
This fixes envoyproxy#9784 and re-enables vhds_integration_test

Risk Level: Low, but will most likely increase memory usage

Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
  • Loading branch information
Dmitri Dolguikh committed Jul 17, 2020
1 parent 6f17ae3 commit 06fd1d1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ build:rbe-toolchain-msan --linkopt=-L/opt/libcxx_msan/lib
build:rbe-toolchain-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib
build:rbe-toolchain-msan --config=clang-msan

build:rbe-toolchain-tsan --linkopt=-L/opt/libcxx_tsan/lib
build:rbe-toolchain-tsan --linkopt=-Wl,-rpath,/opt/libcxx_tsan/lib
build:rbe-toolchain-tsan --config=clang-tsan

build:rbe-toolchain-gcc --config=rbe-toolchain
build:rbe-toolchain-gcc --platforms=@rbe_ubuntu_gcc//config:platform
build:rbe-toolchain-gcc --host_platform=@rbe_ubuntu_gcc//config:platform
Expand Down Expand Up @@ -229,6 +233,10 @@ build:docker-msan --config=docker-sandbox
build:docker-msan --config=rbe-toolchain-clang-libc++
build:docker-msan --config=rbe-toolchain-msan

build:docker-tsan --config=docker-sandbox
build:docker-tsan --config=rbe-toolchain-clang-libc++
build:docker-tsan --config=rbe-toolchain-tsan

# CI configurations
build:remote-ci --remote_cache=grpcs://remotebuildexecution.googleapis.com
build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com
Expand Down
2 changes: 1 addition & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ elif [[ "$CI_TARGET" == "bazel.tsan" ]]; then
setup_clang_toolchain
echo "bazel TSAN debug build with tests"
echo "Building and testing envoy tests ${TEST_TARGETS}"
bazel_with_collection test ${BAZEL_BUILD_OPTIONS} -c dbg --config=clang-tsan --build_tests_only ${TEST_TARGETS}
bazel_with_collection test --config=rbe-toolchain-tsan ${BAZEL_BUILD_OPTIONS} -c dbg --build_tests_only ${TEST_TARGETS}
if [ "${ENVOY_BUILD_FILTER_EXAMPLE}" == "1" ]; then
echo "Building and testing envoy-filter-example tests..."
pushd "${ENVOY_FILTER_EXAMPLE_SRCDIR}"
Expand Down
2 changes: 0 additions & 2 deletions source/common/filesystem/posix/filesystem_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ std::string InstanceImplPosix::fileReadToEnd(const std::string& path) {
throw EnvoyException(absl::StrCat("Invalid path: ", path));
}

std::ios::sync_with_stdio(false);

std::ifstream file(path);
if (file.fail()) {
throw EnvoyException(absl::StrCat("unable to read file: ", path));
Expand Down
2 changes: 0 additions & 2 deletions test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ envoy_cc_test(
],
tags = [
"fails_on_windows",
# https://github.com/envoyproxy/envoy/issues/9784
"no_tsan",
],
deps = [
":http_integration_lib",
Expand Down

0 comments on commit 06fd1d1

Please sign in to comment.